public function getUserByTokenAuth($tokenAuth) { $db = $this->getDb(); return $db->fetchRow('SELECT * FROM ' . $this->table . ' WHERE token_auth = ?', $tokenAuth); }
private function authenticateWithToken($token) { $user = $this->userModel->getUserByTokenAuth($token); if (!empty($user['login'])) { return $this->authenticationSuccess($user); } return new AuthResult(AuthResult::FAILURE, null, $token); }