public static function fromResourceLink($resourceLink, $ltiUserId)
    {

        $user = new User();
        $user->resourceLink = $resourceLink;
        if (!is_null($resourceLink)) {
            $user->resourceLinkId = $resourceLink->getRecordId();
            $user->dataConnector = $resourceLink->getDataConnector();
        }
        $user->ltiUserId = $ltiUserId;
        if (!empty($ltiUserId)) {
            $user->load();
        }

        return $user;

    }
public static function fromResourceLink($resourceLink, $ltiUserId)
    {

        $user = new User();
        $user->resourceLink = $resourceLink;
        if (!is_null($resourceLink)) {
            $user->resourceLinkId = $resourceLink->getRecordId();
            $user->dataConnector = $resourceLink->getDataConnector();
        }
        $user->ltiUserId = $ltiUserId;
        if (!empty($ltiUserId)) {
            $user->load();
        }

        return $user;

    }
public static function fromResourceLink ( $ resourceLink , $ ltiUserId ) { $ user = new User ( ) ; $ user -> resourceLink = $ resourceLink ; if ( ! is_null ( $ resourceLink ) ) { $ user -> resourceLinkId = $ resourceLink -> getRecordId ( ) ; $ user -> dataConnector = $ resourceLink -> getDataConnector ( ) ; } $ user -> ltiUserId = $ ltiUserId ; if ( ! empty ( $ ltiUserId ) ) { $ user -> load ( ) ; } return $ user ; }
Class constructor from resource link.

@param ResourceLink $resourceLink Resource_Link object
@param string $ltiUserId User ID value
@return User
Class constructor from resource link .