function ldapdata_user_update_ldap_attributes in LDAP integration 5.2
Same name and namespace in other branches
- 5 ldapdata.module \ldapdata_user_update_ldap_attributes()
1 call to ldapdata_user_update_ldap_attributes()
File
- ./
ldapdata.module, line 613
Code
function ldapdata_user_update_ldap_attributes(&$edit, &$user) {
global $ldap;
$writeout = array();
$editables = _ldapdata_ldap_info($user, 'ldapdata_rwattrs');
foreach ($edit as $edit_attr => $edit_val) {
// Preventing a POST data injection: we check allowance to write value.
if (array_search($edit_attr, $editables) !== FALSE) {
$writeout[$edit_attr] = $edit_val;
$edit[$edit_attr] = null;
}
}
return $writeout;
}