@@ -108,7 +108,7 @@ |
||
108 | 108 | * @param string $login Loginname |
109 | 109 | * @param string $pass Password |
110 | 110 | * @return boolean |
111 | - */ |
|
111 | + */ |
|
112 | 112 | public function changePassword($login, $pass) |
113 | 113 | { |
114 | 114 | $change = sprintf(" |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | $bindLogin = $login; |
179 | 179 | if ($this->_ldapConfig['ldap_use_domain_prefix']) { |
180 | 180 | if (array_key_exists('domain', $optionalData)) { |
181 | - $bindLogin = $optionalData['domain'] . '\\' . $login; |
|
181 | + $bindLogin = $optionalData['domain'].'\\'.$login; |
|
182 | 182 | } |
183 | 183 | } else { |
184 | 184 | $this->ldap = new PMF_Ldap($this->_config); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | htmlspecialchars_decode($password) |
207 | 207 | ); |
208 | 208 | |
209 | - if (! $this->ldap->bind($bindLogin, htmlspecialchars_decode($password))) { |
|
209 | + if (!$this->ldap->bind($bindLogin, htmlspecialchars_decode($password))) { |
|
210 | 210 | $this->errors[] = $this->ldap->error; |
211 | 211 | return false; |
212 | 212 | } else { |
@@ -73,14 +73,14 @@ |
||
73 | 73 | return mb_detect_encoding($str, 'UTF-8', true); |
74 | 74 | } else { |
75 | 75 | $regex = '/^([\x00-\x7f]|' |
76 | - . '[\xc2-\xdf][\x80-\xbf]|' |
|
77 | - . '\xe0[\xa0-\xbf][\x80-\xbf]|' |
|
78 | - . '[\xe1-\xec][\x80-\xbf]{2}|' |
|
79 | - . '\xed[\x80-\x9f][\x80-\xbf]|' |
|
80 | - . '[\xee-\xef][\x80-\xbf]{2}|' |
|
81 | - . '\xf0[\x90-\xbf][\x80-\xbf]{2}|' |
|
82 | - . '[\xf1-\xf3][\x80-\xbf]{3}|' |
|
83 | - . '\xf4[\x80-\x8f][\x80-\xbf]{2})*$/'; |
|
76 | + . '[\xc2-\xdf][\x80-\xbf]|' |
|
77 | + . '\xe0[\xa0-\xbf][\x80-\xbf]|' |
|
78 | + . '[\xe1-\xec][\x80-\xbf]{2}|' |
|
79 | + . '\xed[\x80-\x9f][\x80-\xbf]|' |
|
80 | + . '[\xee-\xef][\x80-\xbf]{2}|' |
|
81 | + . '\xf0[\x90-\xbf][\x80-\xbf]{2}|' |
|
82 | + . '[\xf1-\xf3][\x80-\xbf]{3}|' |
|
83 | + . '\xf4[\x80-\x8f][\x80-\xbf]{2})*$/'; |
|
84 | 84 | return preg_match($regex, $str) === 1; |
85 | 85 | } |
86 | 86 | } |