Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
linenumberstrue
... 
user.flexAttributes
...

string user.get(key)

Returns the value of key as string or null if no value is set under the key.

Example

Code Block
languagejs
linenumberstrue
... 
user.get(key)
...

Parameter key:string (required)

The key to be looked up in the flexAttributes of the user.

boolean user.has(key)

Returns a boolean value depending on whether key is present for a given user.

...

Code Block
languagejs
linenumberstrue
... 
user.has(key)
...

Parameter key:string (required)

The key tob e checked in the flexAttributes of the user.

int user.id

Returns the id of the user

...

Code Block
languagejs
linenumberstrue
... 
user.increment(key)
...

Parameter key:string (required)

The key to be incremented in the flexAttributes of the user.

string user.name

Returns the name of the user

...

user.remove(key)

Removes the given key from a the flexAttributes of the user

Example

Code Block
languagejs
linenumberstrue
... 
user.remove(key)
...

Parameter key:string (required)

The key to be removed from the flexAttributes of the user.

user.set(key, value

...

)

Sets the value of a specified key for a given user.

...

Code Block
languagejs
linenumberstrue
... 
var text = request.parameter("text");
  
user.set("smp.util.notes.text", text);
...

Parameter key:string (required)

The key to be set in the flexAttributes of the user.

Parameter value:string (required)

...

The value to be set for the key

user.setPassword(password)

...