kernel/private/oauth/classes/restclient.php
public function isAuthorizedByUser( $scope, $user = null )
    {
        if ( $user === null )
            $user = eZUser::currentUser();

        if ( !$user->isRegistered() )
            throw new Exception( "Anonymous user can not authorize an application" );

        $authorized = ezpRestAuthorizedClient::fetchForClientUser( $this, $user );
        return ( $authorized instanceof ezpRestAuthorizedClient );
    }
public function isAuthorizedByUser( $scope, $user = null )
    {
        if ( $user === null )
            $user = eZUser::currentUser();

        if ( !$user->isRegistered() )
            throw new Exception( "Anonymous user can not authorize an application" );

        $authorized = ezpRestAuthorizedClient::fetchForClientUser( $this, $user );
        return ( $authorized instanceof ezpRestAuthorizedClient );
    }
public function isAuthorizedByUser ( $ scope , $ user = null ) { if ( $ user === null ) $ user = eZUser :: currentUser ( ) ; if ( ! $ user -> isRegistered ( ) ) throw new Exception ( "Anonymous user can not authorize an application" ) ; $ authorized = ezpRestAuthorizedClient :: fetchForClientUser ( $ this , $ user ) ; return ( $ authorized instanceof ezpRestAuthorizedClient ) ; }
Checks if this application has been authorized by the current user

@param mixed $scope The requested security scope
@param eZUser $user The user to check authorization for. Will check for current user if not given.

@return bool

@todo Handle non-authorization using
Checks if this application has been authorized by the current user