MyBB Community Forums

Full Version: How to extract username
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey,

Does anybody know the functions needed to extract if a username if a user is logged in.

I'd like to store their username in a separate table.

Thanks
$mybb->user['username']
Current online user is $mybb->user and his username is $mybb->user['username']

I suppose you want something like:
if($mybb->user['uid'])
{
echo "Your username is {$mybb->user['username']}!";
}
else
{
echo "Youa re a guest!";
}

grrr, Paul H. >_>
And this is in R/S/J why?
(2012-07-11, 08:02 PM)euantor Wrote: [ -> ]And this is in R/S/J why?

Because I was requesting the function code. Huh

Sorry if I was wrong.
(2012-07-11, 08:11 PM)Hostpro Wrote: [ -> ]
(2012-07-11, 08:02 PM)euantor Wrote: [ -> ]And this is in R/S/J why?

Because I was requesting the function code. Huh

Sorry if I was wrong.

Don't worry. Smile It's not the right section though. This should probably be in general support. Toungue
(2012-07-12, 12:35 PM)Jack Clarke Wrote: [ -> ]
(2012-07-11, 08:11 PM)Hostpro Wrote: [ -> ]
(2012-07-11, 08:02 PM)euantor Wrote: [ -> ]And this is in R/S/J why?

Because I was requesting the function code. Huh

Sorry if I was wrong.

Don't worry. Smile It's not the right section though. This should probably be in general support. Toungue

He moved it from Requests / Services / Jobs to Plugins & Code Modifications / Development