Namespace: user

user

Methods

(static) getCurrentUser() → {Promise.<object>}

Returns a promise with the current spuser object.
Source:
Returns:
the promise with the user object
Type
Promise.<object>
Example
sputils.user.getCurrentUser().then(function (data) {
  console.log(data);

(static) getCurrentUserPersonalSiteUrl(config) → {Promise.<object>}

Returns full url to profile page of current user
Parameters:
Name Type Description
config object an object containing config for the REST call
Source:
Returns:
Type
Promise.<object>
Example
sputils.user.getCurrentUserPersonalSiteUrl()
   .then(function (data) { console.log(data) });

(static) loginAsAnotherUser() → {void}

Source:
Returns:
Type
void
Example
sputils.user.loginAsAnotherUser();

(static) logoutUser() → {void}

Source:
Returns:
Type
void
Example
sputils.user.logoutUser();