home - docs - posts - github - contact - rss

JS - User Functions

checkpassword

Checks if a string matches the current user's password.

checkuser

Checks if a user exists and returns their username.

editsig

Allows the user to edit their signature.

getactions

Gets current node actions, returns an array of objects with the uid of the user logged in to the node (or 0 if none) and the action.

Example return value for a 2 node system

[
{
"uid": 1,
"action": "Browsing main menu"
},
{
"uid": 0,
"action": "Waiting for Caller"
}

]

getattr

Get an attribute of the current user.

getattro

Get an attribute of specified user.

getusername

Get the current user's username.

getusernameo

Gets the username of a specified user.

getusers

Get's an array of objects representing all users on the system,

Example user list.

  [
{
"uid": 1,
"username": "Some User"
},
{
"uid": 2,
"username": "Some Other User"
}
]

isvisible

Checks if a user should be 'visible'.

putattr

Saves an attribute for the current user.

putattro

Saves an attribute for the specified user.

setaction

Sets the node action for the current node.

setpassword

Sets the current user's password

setpasswordo

Sets the specified user's password

timeleft

The amount of time a user has left for the day

Back to Documentation