Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: ۞ on March 16, 2004, 11:34:22 AM

Title: in YSE you had the $username variable in SSI.php
Post by: ۞ on March 16, 2004, 11:34:22 AM
...and I used it for a whole load of queries. $username seems to be gone now...

I figured the easiest way to fix my problem would be to define the $username variable in SSI.php but... I can't figure out how the username is stored.. I found $context['user']['name'] but that's from the welcome message, so i'm guessing that's the display name.

What do I need?

Thanks for any help.
Title: Re: in YSE you had the $username variable in SSI.php
Post by: MrCue on March 16, 2004, 11:43:25 AM
take a look at whats stored in $user_info & $user_settings arrays when using SSI.
Title: Re: in YSE you had the $username variable in SSI.php
Post by: Grudge on March 16, 2004, 12:05:26 PM
$user_info['username'] is what you want by the sound of it. Although if you are DISPLAYING their name use $user_info['name']
Title: Re: in YSE you had the $username variable in SSI.php
Post by: [Unknown] on March 16, 2004, 12:23:53 PM
But you should be using $ID_MEMBER in your queries :P.

-[Unknown]
Title: Re: in YSE you had the $username variable in SSI.php
Post by: ۞ on March 16, 2004, 03:30:58 PM
 
$user_info['username'] is what you want by the sound of it.

Thanks, that's exactly what I needed.