LSformElement::password : Fixed bug in verifyPassword() method

This commit is contained in:
Benjamin Renard 2011-05-23 11:31:59 +02:00
parent 87e23f2ea4
commit 170a5870b6

View file

@ -168,7 +168,16 @@ class LSformElement_password extends LSformElement {
else {
$hash = $this -> attr_html -> attribute -> ldap -> encodePassword($pwd);
$find=false;
foreach($this -> attr_html -> attribute -> data as $val) {
if (is_array($this -> attr_html -> attribute -> data)) {
$data = $this -> attr_html -> attribute -> data;
}
elseif (!is_array($this -> attr_html -> attribute -> data) && !empty($this -> attr_html -> attribute -> data)) {
$data = array($this -> attr_html -> attribute -> data);
}
else {
return $find;
}
foreach($data as $val) {
if ($hash == $val)
$find=true;
}