@@ 220-231 (lines=12) @@ | ||
217 | $user->storeCookie($this->includeDomain); |
|
218 | } |
|
219 | $return = ['success' => true]; |
|
220 | } else { |
|
221 | $session = new Ajde_Session('user'); |
|
222 | $attempts = $session->has('attempts') ? $session->get('attempts') : 1; |
|
223 | $session->set('attempts', $attempts + 1); |
|
224 | if ($attempts % 4 === 0) { |
|
225 | sleep(5); |
|
226 | } |
|
227 | $return = [ |
|
228 | 'success' => false, |
|
229 | 'message' => trans('We could not log you in with these credentials'), |
|
230 | ]; |
|
231 | } |
|
232 | ||
233 | return $return; |
|
234 | } |
|
@@ 267-278 (lines=12) @@ | ||
264 | 'message' => trans('We could not reset your password. Please contact our technical staff.'), |
|
265 | ]; |
|
266 | } |
|
267 | } else { |
|
268 | $session = new Ajde_Session('user'); |
|
269 | $attempts = $session->has('attempts') ? $session->get('attempts') : 1; |
|
270 | $session->set('attempts', $attempts + 1); |
|
271 | if ($attempts % 4 === 0) { |
|
272 | sleep(5); |
|
273 | } |
|
274 | $return = [ |
|
275 | 'success' => false, |
|
276 | 'message' => trans('No matching user found'), |
|
277 | ]; |
|
278 | } |
|
279 | ||
280 | return $return; |
|
281 | } |