function user_fields in Drupal 6
Same name and namespace in other branches
- 4 modules/user.module \user_fields()
- 5 modules/user/user.module \user_fields()
2 calls to user_fields()
- profile_field_form_validate in modules/
profile/ profile.admin.inc - Validate profile_field_form submissions.
- user_save in modules/
user/ user.module - Save changes to a user account or add a new user.
File
- modules/
user/ user.module, line 559 - Enables the user registration and login system.
Code
function user_fields() {
static $fields;
if (!$fields) {
$result = db_query('SELECT * FROM {users} WHERE uid = 1');
if ($field = db_fetch_array($result)) {
$fields = array_keys($field);
}
else {
// Make sure we return the default fields at least.
$fields = array(
'uid',
'name',
'pass',
'mail',
'picture',
'mode',
'sort',
'threshold',
'theme',
'signature',
'signature_format',
'created',
'access',
'login',
'status',
'timezone',
'language',
'init',
'data',
);
}
}
return $fields;
}