function _ldapdata_retrieve_standard_user_fields in LDAP integration 6
Same name and namespace in other branches
- 5.2 ldapdata.module \_ldapdata_retrieve_standard_user_fields()
- 5 ldapdata.module \_ldapdata_retrieve_standard_user_fields()
Retrieve drupal user fields which can be synced with LDAP.
Return value
An array of user fields.
1 call to _ldapdata_retrieve_standard_user_fields()
- ldapdata_admin_edit in ./
ldapdata.admin.inc - Implements the LDAP server edit page.
File
- ./
ldapdata.module, line 730 - ldapdata provides data maping against ldap server.
Code
function _ldapdata_retrieve_standard_user_fields() {
// pablom -
// This commented code below would return all possible values,
// but maybe that's not appropriate.
//
// $fields = array();
// $result = db_query('SHOW COLUMNS FROM {users}');
// while ($row = db_fetch_object($result)) {
// $fields[] = $row->Field;
// }
// Rather, I'll use my benevolent dictator powers
// to return only sensible ones.
$fields = array(
'mail' => 'mail',
'pass' => 'pass',
'signature' => 'signature',
);
if (variable_get('user_pictures', '0')) {
$fields['picture'] = 'picture';
}
return $fields;
}