Accounts & Sessions

Create and manage users accounts and sessions.


The Account object
Method Description
findUserByEmail Finds a user by email.
findUserByHash Finds a user by the hash generated from the reset password flow.
setPassword Directly updates an account password.


The Session object
Method Description
check Validates a session using core_u and core_x and returns information about that session.
create Creates a new session.
createCrossDomain Creates a user session and generates a redirect url to handle core_u and core_x cookies.
joinCrossDomain Validates a session using a keymaster redirect url.
login Validates a user's credentials and creates a session.
loginCrossDomain Validates a user's credentials and creates a session. Generates a redirect url to handle core_u and core_x cookies.
logout Destroys a user's session.


The User object
Method Description
addExternalAccount Associates an external account with a user.
addExternalProperty Adds an external property to a user.
create Creates a new user.
createWithSession Creates a new user and a session for that user.
delete Deletes a user.
deleteExternalAccount Deletes an associated external account.
deleteExternalProperty Removes an external property associated with a user.
getDetails Fetches basic information about a user.
getExternalAccount Fetches a single external account associated with a user.
getExternalProperty Fetches an external property value associated with a user.
getOrCreate Retrieves an existing user or attempts to create one if none is found.
getUserByExternalProperty Fetches the user associated with an external property.
isEmailTaken Checks whether the email address is taken on this node.
isExternalAccountTaken Checks whether the external account is taken on this node.
isSubdirTaken Checks whether the subdir is taken on this node.
isUsernameTaken Checks whether the username is taken on this node.
update Updates a user's basic account information and preferences.
updateExternalAccount Updates an associated external account.
validateCredentials Validates a user's login credentials.