LSattr_ldap_password : Fixed getDisplayValue() method

This commit is contained in:
Benjamin Renard 2013-06-26 11:31:21 +02:00
parent 26e1886179
commit 53679139cf

View file

@ -36,8 +36,25 @@ class LSattr_ldap_password extends LSattr_ldap {
* @retval mixed The display value of this attribute * @retval mixed The display value of this attribute
*/ */
function getDisplayValue($data) { function getDisplayValue($data) {
if ($this -> config['ldap_options']['displayClearValue']) {
if (is_array($data)) {
$ret=array();
foreach($data as $p) {
if ($p==$this -> config['ldap_options']['wildcardPassword'] || $p==$this -> config['ldap_options']['encodedWildcardPassword']) {
continue;
}
$ret[]=$p;
}
return $ret;
}
else {
return $data;
}
}
else {
return '********'; return '********';
} }
}
/** /**
* Return the value of this attribute to be stocked * Return the value of this attribute to be stocked