@@ 193-199 (lines=7) @@ | ||
190 | $message = $messages[0]; // first message is user readable, suitable for showing on login form |
|
191 | ||
192 | // show better errors than the defaults for various status codes returned by LDAP |
|
193 | if (!empty($messages[1]) && strpos($messages[1], 'NT_STATUS_ACCOUNT_LOCKED_OUT') !== false) { |
|
194 | $message = _t( |
|
195 | __CLASS__ . '.ACCOUNTLOCKEDOUT', |
|
196 | 'Your account has been temporarily locked because of too many failed login attempts. ' . |
|
197 | 'Please try again later.' |
|
198 | ); |
|
199 | } |
|
200 | if (!empty($messages[1]) && strpos($messages[1], 'NT_STATUS_LOGON_FAILURE') !== false) { |
|
201 | $message = _t( |
|
202 | __CLASS__ . '.INVALIDCREDENTIALS', |
|
@@ 200-205 (lines=6) @@ | ||
197 | 'Please try again later.' |
|
198 | ); |
|
199 | } |
|
200 | if (!empty($messages[1]) && strpos($messages[1], 'NT_STATUS_LOGON_FAILURE') !== false) { |
|
201 | $message = _t( |
|
202 | __CLASS__ . '.INVALIDCREDENTIALS', |
|
203 | 'The provided details don\'t seem to be correct. Please try again.' |
|
204 | ); |
|
205 | } |
|
206 | ||
207 | return [ |
|
208 | 'success' => $result->getCode() === 1, |