MyBB Community Forums

Full Version: User custom profile fields
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So, i use the $user['fidx'] to get the custom profile fields, however one user that i tested with (which happens to be super admin) the $user array doesnt have any fid keys, and the other user (uid 2) has allt he fid that i need.

it's really puzzling me, and any help would be much appreciated. is it because the user was created before the fid's were added?
If a user was created before a field was added it will not have any value.
(2014-09-10, 07:20 PM)dragonexpert Wrote: [ -> ]If a user was created before a field was added it will not have any value.

i see, i added values to the user in the database, but i assume that has no bearing?

is there anything i can do?

(2014-09-10, 07:42 PM)jasonw749 Wrote: [ -> ]
(2014-09-10, 07:20 PM)dragonexpert Wrote: [ -> ]If a user was created before a field was added it will not have any value.

i see, i added values to the user in the database, but i assume that has no bearing?

is there anything i can do?

another thing, does this also affect new fields being created, for example, if i added a new field, will it not appear for anyone who already has an account?





After doing some more testing, i have discovered that the get_user($uid) user contains the fidx fields of the user that i'm logged in as. is there a way to get the fidx of ANY user?
You'd need this:
$query = $db->simple_select("profilefields", "*", "puid=x");
$memprofile = $db->fetch_array($query);

Replace x with the users uid.
(2014-09-10, 08:18 PM)dragonexpert Wrote: [ -> ]You'd need this:

$query = $db->simple_select("profilefields", "*", "puid=x");
$memprofile = $db->fetch_array($query);

Replace x with the users uid.

thanks a lot, much appreciated Smile
Turns out the table is userfields instead of profilefields.