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