1
0
mirror of https://github.com/delight-im/PHP-Auth.git synced 2025-08-05 07:37:25 +02:00

Optimize order of throttling in 'changeEmail' method from class 'Auth'

This commit is contained in:
Marco
2017-11-08 20:40:37 +01:00
parent 23acb66cc7
commit ab1c54fae2

View File

@@ -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);
}