Username of the current WordPress user is stored in this global variable. It is set using the cookie in the pluggable functions set_current_user($id, $name='') and get_currentuserinfo() defined in [wordpress root folder]/wp-includes/pluggable-functions.php.

It is used to get userdata using the username., e.g., $userdata = get_userdatabylogin($user_login);. The plugin and theme authors need not use this, as the user data is already available in the current_user and other global variables..

Back to full list of global variables.

Technorati tags: , ,

Discussion [Participate or Link]

  1. Abhijit Nadgouda @ iface » Blog Archive » Wordpress Global Variables said:

    […] $user_login […]

Say your thought!

If you want to use HTML you can use these tags: <a>, <em>, <strong>, <abbr>, <code>, <blockquote>. Closing the tags will be appreciated as this site uses valid XHTML.



Abhijit Nadgouda
iface Consulting
+91 9819820312
My bookmarks


This is the weblog of Abhijit Nadgouda where he writes down his thoughts on software development and related topics. You are invited to subscribe to the feed to stay updated or check out more subscription options. Or you can choose to browse by one of the topics.