v2.7 (latest)
UserStore ​
Collection of Rulecube User-related functions.
Methods ​
invite ​
javascript
invite(email: string, options: { accessExpirationDate?: Date | string, roles: string[] })Creates a user with the given email and options.
Parameters
email string
The email of the user.
options { accessExpirationDate?: Date | string, roles: string[] }
The object containing the user options.
Return type
Examples
javascript
UserStore.invite('user@example.org', { accessExpirationDate: TODAY().addDays(30), roles: ['WorkspaceUser'] })getByEmail ​
javascript
getByEmail(email: string)Gets a user by email.
Parameters
email string
The email of the user.
Return type
{ [key: string]: any; }
Examples
javascript
UserStore.getByEmail('demo@example.org')delete ​
javascript
delete(userId: string)Deletes a user by user ID.
Parameters
userId string
The ID of the user to delete.
Return type
boolean
Examples
javascript
let user = UserStore.getByEmail('demo@example.org')
UserStore.delete(user.id);