...
Info |
---|
What can JSMA user do for me?You could easily use the JSMA user to edit a user |
...
The JSMA user provides the following methods:
user.flexAttributes
...
Returns an array of the flex attributes of a user
...
Code Block | ||||
---|---|---|---|---|
| ||||
...
user.flexAttributes()
... |
user.get(key)
Returns the value of key as string.
...
Code Block | ||||
---|---|---|---|---|
| ||||
... user.has(key) ... |
Parameter key (required)
int user.id
Returns the id of the user
Example
Code Block | ||||
---|---|---|---|---|
| ||||
...
user.id
... |
user.increment(key)
Increments the vale of a given key by one.
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... user.increment(key) ... |
...
Returns the name of the user
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... user.name ... |
...
Removes the given key from a user
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... user.remove(key) ... |
...
Sets the value of a specified key for a given user.
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... var text = request.parameter("text"); user.set("smp.util.notes.text", text); ... |
...
Sets the password for a user
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... user.setPassword(password) ... |
...