Ejemplo n.º 1
0
 /**
  * Resets the failed-login counter of a user back to 0
  *
  * @param $user_name
  */
 public static function resetFailedLoginCounterOfUser($user_name)
 {
     if (self::$resetFailedLoginQuery === null) {
         self::$resetFailedLoginQuery = DatabaseFactory::getFactory()->getConnection()->prepare("UPDATE users\n                   SET user_failed_logins = 0, user_last_failed_login = NULL\n                 WHERE user_name = :user_name AND user_failed_logins != 0\n                 LIMIT 1");
     }
     self::$resetFailedLoginQuery->execute(array(':user_name' => $user_name));
 }