You are here

function ldapdata_user_update_ldap_attributes in LDAP integration 5

Same name and namespace in other branches
  1. 5.2 ldapdata.module \ldapdata_user_update_ldap_attributes()
1 call to ldapdata_user_update_ldap_attributes()
ldapdata_user_update in ./ldapdata.module

File

./ldapdata.module, line 611

Code

function ldapdata_user_update_ldap_attributes(&$edit, &$user) {
  global $ldapdata_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;
}