From ab1c54fae2505a5b69b12f554722bfe3d6f344d8 Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 8 Nov 2017 20:40:37 +0100 Subject: [PATCH] Optimize order of throttling in 'changeEmail' method from class 'Auth' --- src/Auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Auth.php b/src/Auth.php index 4d742a2..ac5f4ca 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -753,8 +753,8 @@ final class Auth extends UserManager { throw new EmailNotVerifiedException(); } - $this->throttle([ 'requestEmailChange', $this->getIpAddress() ], 1, (60 * 60 * 24), 3); $this->throttle([ 'requestEmailChange', 'userId', $this->getUserId() ], 1, (60 * 60 * 24)); + $this->throttle([ 'requestEmailChange', $this->getIpAddress() ], 1, (60 * 60 * 24), 3); $this->createConfirmationRequest($this->getUserId(), $newEmail, $callback); }