mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-18 16:19:06 +01:00
LSformElement :: password : Added support of verify feature for non login password
This commit is contained in:
parent
47e2c56907
commit
e9d72a6c10
1 changed files with 25 additions and 9 deletions
|
@ -60,13 +60,11 @@ class LSformElement_password extends LSformElement {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($this -> params['html_options']['isLoginPassword']) || $this -> params['html_options']['isLoginPassword']) {
|
if ($this -> verifyPassword($return[$this -> name][0])) {
|
||||||
if ($this -> verifyPassword($return[$this -> name][0])) {
|
LSdebug("Password : no change");
|
||||||
LSdebug("Password : no change");
|
unset($return[$this -> name]);
|
||||||
unset($return[$this -> name]);
|
$this -> form -> _notUpdate[$this -> name] == true;
|
||||||
$this -> form -> _notUpdate[$this -> name] == true;
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Mail
|
//Mail
|
||||||
|
@ -164,7 +162,18 @@ class LSformElement_password extends LSformElement {
|
||||||
if ($this -> attr_html -> attribute -> ldapObject -> isNew()) {
|
if ($this -> attr_html -> attribute -> ldapObject -> isNew()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return LSsession :: checkUserPwd($this -> attr_html -> attribute -> ldapObject,$pwd);
|
if ($this -> isLoginPassword()) {
|
||||||
|
return LSsession :: checkUserPwd($this -> attr_html -> attribute -> ldapObject,$pwd);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$hash = $this -> attr_html -> attribute -> ldap -> encodePassword($pwd);
|
||||||
|
$find=false;
|
||||||
|
foreach($this -> attr_html -> attribute -> data as $val) {
|
||||||
|
if ($hash == $val)
|
||||||
|
$find=true;
|
||||||
|
}
|
||||||
|
return $find;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function send($params) {
|
function send($params) {
|
||||||
|
@ -258,6 +267,13 @@ class LSformElement_password extends LSformElement {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isLoginPassword() {
|
||||||
|
if (!isset($this -> params['html_options']['isLoginPassword']) || $this -> params['html_options']['isLoginPassword']) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in a new issue