Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: MechSpecs - syyskuu 08, 2013, 12:40:20 IP

Otsikko: Looking for array name to grab Member Location from....
Kirjoitti: MechSpecs - syyskuu 08, 2013, 12:40:20 IP
I'm using a custom page in SimplePortal that presents the user with an application form (for a gaming league).

I'm trying to pull as much data from their actual forum registration as possible. So far I have it automatically pulling their member name... like this...


array(

               'caption' =>        "What is your MWO Pilot Name / Callsign",

               'name' =>            "nickname",

               'type' =>            "text",

               'options' =>        "",

               'defaultvalue' =>     $context["user"]["name"],

               'required' =>        1 

           ),


What I can NOT find is where the member location is stored. $member["location"] doesn't work.

Any ideas on this?

EDIT: Yes, I have done NUMEROUS searches on trying to solve this issue and so far haven't found anything that works.
Otsikko: Re: Looking for array name to grab Member Location from....
Kirjoitti: Sir Osis of Liver - syyskuu 08, 2013, 03:50:01 IP

$context['member']['location']

Otsikko: Re: Looking for array name to grab Member Location from....
Kirjoitti: Arantor - syyskuu 08, 2013, 03:57:09 IP
That only works in the profile area... (since that's the only place $context['member'] is actually declared)

You might actually find it in $user_settings['location'] assuming it's the default field and not a custom field or anything.
Otsikko: Re: Looking for array name to grab Member Location from....
Kirjoitti: MechSpecs - syyskuu 08, 2013, 06:48:45 IP
Lainaus käyttäjältä: Arantor - syyskuu 08, 2013, 03:57:09 IP
That only works in the profile area... (since that's the only place $context['member'] is actually declared)

You might actually find it in $user_settings['location'] assuming it's the default field and not a custom field or anything.

Thank you sir! You saved from Headache Round 2 after last nights searching. Which there was a manual were all this kinda information was stored or at least a manual that showed up during searches for it LOL
Otsikko: Re: Looking for array name to grab Member Location from....
Kirjoitti: Arantor - syyskuu 08, 2013, 06:57:20 IP
The problem with a manual is that no-one actually wants to write it.