From cce172442d6cbd702f920e86cada800a104f94dd Mon Sep 17 00:00:00 2001 From: Marco Date: Sat, 20 Aug 2016 20:57:00 +0200 Subject: [PATCH] Rename constant --- src/Auth.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Auth.php b/src/Auth.php index 20d9e57..a12989c 100644 --- a/src/Auth.php +++ b/src/Auth.php @@ -24,7 +24,7 @@ class Auth { const IP_ADDRESS_HASH_ALGORITHM = 'sha256'; const THROTTLE_ACTION_LOGIN = 'login'; const THROTTLE_ACTION_REGISTER = 'register'; - const THROTTLE_ACTION_CONFIRM_EMAIL = 'confirm_email'; + const THROTTLE_ACTION_CONSUME_TOKEN = 'confirm_email'; const HTTP_STATUS_CODE_TOO_MANY_REQUESTS = 429; /** @var \PDO the database connection that will be used */ @@ -527,8 +527,8 @@ class Auth { * @throws AuthError if an internal problem occurred (do *not* catch) */ public function confirmEmail($selector, $token) { - $this->throttle(self::THROTTLE_ACTION_CONFIRM_EMAIL); - $this->throttle(self::THROTTLE_ACTION_CONFIRM_EMAIL, $selector); + $this->throttle(self::THROTTLE_ACTION_CONSUME_TOKEN); + $this->throttle(self::THROTTLE_ACTION_CONSUME_TOKEN, $selector); $stmt = $this->db->prepare("SELECT id, email, token, expires FROM users_confirmations WHERE selector = :selector"); $stmt->bindValue(':selector', $selector, \PDO::PARAM_STR);