public function revoke($iUserId, $mToken)
    {
        if (is_string($mToken)) {
            $oToken = $this->getByToken($mToken);
        } else {
            $oToken = $mToken;
        }

        if ($oToken) {

            if ($oToken->user_id === $iUserId) {
                return $this->delete($oToken->id);
            } else {
                $this->setError('Not authorised to revoke that token.');
                return false;
            }

        } else {
            return false;
        }
    }
public function revoke($iUserId, $mToken)
    {
        if (is_string($mToken)) {
            $oToken = $this->getByToken($mToken);
        } else {
            $oToken = $mToken;
        }

        if ($oToken) {

            if ($oToken->user_id === $iUserId) {
                return $this->delete($oToken->id);
            } else {
                $this->setError('Not authorised to revoke that token.');
                return false;
            }

        } else {
            return false;
        }
    }
public function revoke ( $ iUserId , $ mToken ) { if ( is_string ( $ mToken ) ) { $ oToken = $ this -> getByToken ( $ mToken ) ; } else { $ oToken = $ mToken ; } if ( $ oToken ) { if ( $ oToken -> user_id === $ iUserId ) { return $ this -> delete ( $ oToken -> id ) ; } else { $ this -> setError ( 'Not authorised to revoke that token.' ) ; return false ; } } else { return false ; } }
Revoke an access token for a user

@param  integer $iUserId The ID of the user the token belongs to
@param  mixed   $mToken  The token object, or a token ID

@return boolean
Revoke an access token for a user