function _ldapdata_edition in LDAP integration 5.2
Same name and namespace in other branches
- 5 ldapdata.module \_ldapdata_edition()
- 6 ldapdata.module \_ldapdata_edition()
5 calls to _ldapdata_edition()
- ldapdata_user_form in ./
ldapdata.module - Only used for editable LDAP attributes with no Drupal equivalents
- ldapdata_user_load in ./
ldapdata.module - ldapdata_user_login in ./
ldapdata.module - ldapdata_user_update in ./
ldapdata.module - ldapdata_user_view in ./
ldapdata.module
File
- ./
ldapdata.module, line 806
Code
function _ldapdata_edition(&$user) {
$ldap_config_name = $user->ldap_config;
$ret[] = array(
'',
'',
);
$result = db_fetch_array(db_query("SELECT ldapdata_binddn, ldapdata_bindpw FROM {ldapauth} WHERE name = '%s'", $ldap_config_name));
$dn = $result['ldapdata_binddn'];
$pass = $result['ldapdata_bindpw'];
if ($dn) {
$ret[0] = $dn;
}
else {
$ret[0] = isset($_SESSION['ldap_login']['dn']) ? $_SESSION['ldap_login']['dn'] : '';
}
if ($pass) {
$ret[1] = $pass;
}
else {
$ret[1] = isset($_SESSION['ldap_login']['pass']) ? $_SESSION['ldap_login']['pass'] : '';
}
return $ret;
}