[wp-hackers] getting current user info

Lloyd Budd lloydomattic at gmail.com
Thu Nov 8 18:14:53 GMT 2007


On 11/8/07, Travis Snoozy <ai2097 at users.sourceforge.net> wrote:
> On Thu, 8 Nov 2007 10:37:22 -0700, "Mindshare Studios"
> <info at mindsharestudios.com> wrote:
>
>
> > I could be barking up the wrong tree entirely. Any suggestions?
>
> You're thinking too hard. ;)
>
> global $current_user;
> $current_user->user_email;
>
> Make sure you're doing it after authentication has taken place, though.

I recently used just this and it is as easy as Andy and Travis suggest
-- bummer is knowing what to look for, but I found similar code in
another plugin (don't recall which one now).

http://codex.wordpress.org/Function_Reference/get_currentuserinfo

Cheers,
-- 
Lloyd Budd | Digital Entomologist | | Skype:foolswisdom
WordPress.com | WordPress.org | Automattic.com


More information about the wp-hackers mailing list