User
Represents a user. This class must not be directly instantiated. Instead, instances of this class are obtained by calling to session#getUser
Member Summary
Public Members | ||
public get |
User's alias |
|
public get |
User's capabilities |
|
public get |
When the user was created (milliseconds) |
|
public get |
The domain of this user |
|
public get |
User's email |
|
public get |
The unique identifier of this user |
|
public get |
User's landLineNumber |
|
public get |
User's lastLogin |
|
public get |
User's mobile phone |
|
public get |
User's role. One of them: "anonymous", "user", "admin" |
|
public get |
The username of this user |
Method Summary
Public Methods | ||
public |
getAddress(): string Returns the address of this user as <user>@<domain> |
|
public |
Returns a JS object with the JSON serialization representation of this object |
|
public |
Update an user |
|
public |
async validatePhone(code: String, phone: String): Promise<User> Check if a code is right to update a phone |
Public Members
Public Methods
public toJSON(): Object source
Returns a JS object with the JSON serialization representation of this object
public async update(objToUpdate: Object): Promise<User> source
Update an user
Example:
// returns this
this.update({
"email": "user@demo.quobis.com",
"mobilePhone": ['phone1', 'phone2'],
"landLineNumber": "landLineNumber"
});