How to extract username
#1
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
Reply
#2
$mybb->user['username']
-Paul H.

Cogisne lingua latina?
Reply
#3
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. >_>
Reply
#4
And this is in R/S/J why?
Reply
#5
(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.
Reply
#6
(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
Reply
#7
(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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)