function ldap_user_ldap_provision_pwd in Lightweight Directory Access Protocol (LDAP) 7.2
Same name and namespace in other branches
- 8.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'.
string | FALSE $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 provisioning to ldap.
File
- ldap_user/ldap_user.module, line 772 
- Module for the LDAP User Entity.
Code
function ldap_user_ldap_provision_pwd($action, $value = NULL, $reset = FALSE) {
  static $current_user_pass;
  if ($reset) {
    $current_user_pass = NULL;
  }
  if ($action == 'set') {
    $current_user_pass = $value;
  }
  elseif ($action == 'get' && $current_user_pass) {
    return $current_user_pass;
  }
  else {
    return FALSE;
  }
}