/** * Method that checks if the id given is equal to the current. * * @param UserToken $aToken The token * * @return bool */ public function equals(UserToken $aToken) { return $this->token === $aToken->token(); }
/** * {@inheritdoc} */ public function userOfRememberPasswordToken(UserToken $aRememberPasswordToken) { $statement = $this->execute('SELECT * FROM user WHERE remember_password_token_token = :rememberPasswordToken', ['rememberPasswordToken' => $aRememberPasswordToken->token()]); if ($row = $statement->fetch(\PDO::FETCH_ASSOC)) { return $this->buildUser($row); } }
/** * Checks if the invitation token is accepted or not. * * @return bool */ public function isInvitationTokenAccepted() { return null === $this->invitationToken || null === $this->invitationToken->token(); }