From 970e400820e598aa7c09bf5e7e71575073c3fe36 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Tue, 9 Nov 2010 16:50:24 +0100 Subject: [PATCH] LSattr_ldap_password : Added wildcardPassword and encodedWildcardPassword options --- .../class/class.LSattr_ldap_password.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/public_html/includes/class/class.LSattr_ldap_password.php b/public_html/includes/class/class.LSattr_ldap_password.php index f33d63de..cba06ccc 100644 --- a/public_html/includes/class/class.LSattr_ldap_password.php +++ b/public_html/includes/class/class.LSattr_ldap_password.php @@ -55,6 +55,28 @@ class LSattr_ldap_password extends LSattr_ldap { $data[]=$this -> encodePassword($this -> clearPassword); + // Wildcard Password + if (isset($this -> config['ldap_options']['wildcardPassword'])) { + if(!is_array($this -> config['ldap_options']['wildcardPassword'])) { + $data[]=$this -> encodePassword($this -> config['ldap_options']['wildcardPassword']); + } + else { + foreach($this -> config['ldap_options']['wildcardPassword'] as $pwd) { + $data[]=$this -> encodePassword($pwd); + } + } + } + + // Wildcard Password already encoded + if (isset($this -> config['ldap_options']['encodedWildcardPassword'])) { + if(!is_array($this -> config['ldap_options']['encodedWildcardPassword'])) { + $data[]=$this -> config['ldap_options']['encodedWildcardPassword']; + } + else { + $data=array_merge($data,$this -> config['ldap_options']['encodedWildcardPassword']); + } + } + return $data; }