function ldap_user_ldap_provision_pwd in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_user/ldap_user.module \ldap_user_ldap_provision_pwd()
function to: -- store user entered password during pageload and protect unencrypted user password from other modules
Parameters
enum string $action 'get' | 'set': @param string | FALE $value as user entered password
2 calls to ldap_user_ldap_provision_pwd()
- ldap_servers_token_tokenize_user_account in ldap_servers/
ldap_servers.tokens.inc - ldap_user_grab_password_validate in ldap_user/
ldap_user.module - store password from logon forms in ldap_user_ldap_provision_pwd static variable for use in provisioing to ldap
File
- ldap_user/
ldap_user.module, line 749 - Module for the LDAP User Entity
Code
function ldap_user_ldap_provision_pwd($action, $value = NULL, $reset = FALSE) {
//$calling_function = FALSE;
//if (function_exists('debug_backtrace') && $backtrace = debug_backtrace()) { // {
// $calling_function = $backtrace[1]['function'];
//}
static $current_user_pass;
if ($reset) {
$current_user_pass = NULL;
}
if ($action == 'set') {
$current_user_pass = $value;
}
elseif ($action == 'get' && $current_user_pass) {
// && (!$calling_function || $calling_function == 'ldap_servers_token_tokenize_user_account')
return $current_user_pass;
}
else {
return FALSE;
}
}