The JSMA user provides functionality for handling users
What can JSMA user do for me?You could use the JSMA user to edit a user |
Here is an example on how to write data to a JSMA user:
... var text = request.parameter("text"); user.set("smp.util.notes.text", text); ... |
Here is an example on how to read data from a JSMA user:
... user.name ... |
The JSMA user provides the following methods:
Returns an array of the flex attributes of a user
... user.flexAttributes ... |
Returns the value of key as string or null if no value is set under the key.
... user.get(key) ... |
The key to be looked up in the flexAttributes of the user.
Returns a boolean value depending on whether key is present for a given user.
... user.has(key) ... |
The key to be checked in the flexAttributes of the user.
Returns the id of the user
... user.id ... |
Increments the vale of a given key by one.
... user.increment(key) ... |
The key to be incremented in the flexAttributes of the user.
Returns the name of the user
... user.name ... |
Removes the key from the flexAttributes of the user
... user.remove(key) ... |
The key to be removed from the flexAttributes of the user.
Sets the value of a specified key for a given user.
... var text = request.parameter("text"); user.set("smp.util.notes.text", text); ... |
The key to be set in the flexAttributes of the user.
The value to be set for the key
Sets the password for a user
... user.setPassword(password) ... |