Customizing SMF > SMF Coding Discussion
Custom profile fields in a global variable
Alex4108:
--- Quote from: CapadY on July 20, 2012, 02:47:51 AM ---Not ?
Try $context[' user_info']
I'm sure it's one of those two.
--- End quote ---
(A write in to index.template.php)
--- Code: ---function template_html_above() {
global $context, $settings, $options, $scripturl, $txt, $modSettings;
if (isset($_GET['debug']) && $context['user']['is_admin']) {
header("Content-type: text/plain"); // So our array is readable
global $user_info;
var_dump($user_info);
var_dump($context);
die();
}
--- End code ---
I CTRL+F'd three times for three different custom values. Didn't show up.
Arantor:
So you're trying to look at the values of other peoples' custom fields rather than the current users, in which case no magic variable will help you and you'll have to go query the database yourself for the fields you want.
Namely querying smf_themes where id_member is the user id and the variable column is derived from the name of your field (begins with cust_)
Navigation
[0] Message Index
[*] Previous page
Go to full version