public function getUserId()
    {
        try {
            $parameters = $this->getParameters();
            if (!isset($parameters[self::LTI_USER_ID])) {
                throw new \common_exception_MissingParameter(self::LTI_USER_ID, __FUNCTION__);
            }
            if (!isset($parameters[self::LTI_CONSUMER_KEY])) {
                throw new \common_exception_MissingParameter(self::LTI_CONSUMER_KEY, __FUNCTION__);
            }

            $id = $parameters[self::LTI_USER_ID];
            $key = $parameters[self::LTI_CONSUMER_KEY];

            $data = $this->getCrudService->getUserId($id, $key);
            if (!$data) {
                \common_Logger::i('Id ' . $id . ' is not found.');
                throw new \common_exception_NotFound('No data found for the given id.');
            }

            $this->returnSuccess($data);
        } catch (\Exception $e) {
            \common_Logger::w($e->getMessage());
            $this->returnFailure($e);
        }
    }
public function getUserId()
    {
        try {
            $parameters = $this->getParameters();
            if (!isset($parameters[self::LTI_USER_ID])) {
                throw new \common_exception_MissingParameter(self::LTI_USER_ID, __FUNCTION__);
            }
            if (!isset($parameters[self::LTI_CONSUMER_KEY])) {
                throw new \common_exception_MissingParameter(self::LTI_CONSUMER_KEY, __FUNCTION__);
            }

            $id = $parameters[self::LTI_USER_ID];
            $key = $parameters[self::LTI_CONSUMER_KEY];

            $data = $this->getCrudService->getUserId($id, $key);
            if (!$data) {
                \common_Logger::i('Id ' . $id . ' is not found.');
                throw new \common_exception_NotFound('No data found for the given id.');
            }

            $this->returnSuccess($data);
        } catch (\Exception $e) {
            \common_Logger::w($e->getMessage());
            $this->returnFailure($e);
        }
    }
public function getUserId ( ) { try { $ parameters = $ this -> getParameters ( ) ; if ( ! isset ( $ parameters [ self :: LTI_USER_ID ] ) ) { throw new \ common_exception_MissingParameter ( self :: LTI_USER_ID , __FUNCTION__ ) ; } if ( ! isset ( $ parameters [ self :: LTI_CONSUMER_KEY ] ) ) { throw new \ common_exception_MissingParameter ( self :: LTI_CONSUMER_KEY , __FUNCTION__ ) ; } $ id = $ parameters [ self :: LTI_USER_ID ] ; $ key = $ parameters [ self :: LTI_CONSUMER_KEY ] ; $ data = $ this -> getCrudService -> getUserId ( $ id , $ key ) ; if ( ! $ data ) { \ common_Logger :: i ( 'Id ' . $ id . ' is not found.' ) ; throw new \ common_exception_NotFound ( 'No data found for the given id.' ) ; } $ this -> returnSuccess ( $ data ) ; } catch ( \ Exception $ e ) { \ common_Logger :: w ( $ e -> getMessage ( ) ) ; $ this -> returnFailure ( $ e ) ; } }
End point to get common user uri by lti user id
@throws \common_exception_NotImplemented
End point to get common user uri by lti user id