Module users

Users library

Functions

getSharedUserPath () Returns the shared user path
getUserPath () Returns the current user path
userForKey (key, pid) Returns the user object for the given key and pid
createKeyForChild (pid) Internal function to create a user key to give to the child of current process
getUser () Returns the current user key
logout () Logouts and set account to guest (Shared).
getById (uid) Get user object from ID
createUser (username, ops) Register a new user
login (username, passwd) Login to a new user using given credentials


Functions

getSharedUserPath ()
Returns the shared user path

Returns:

    string shared user path
getUserPath ()
Returns the current user path

Returns:

    string current user path
userForKey (key, pid)
Returns the user object for the given key and pid

Parameters:

Returns:

    User current user
createKeyForChild (pid)
Internal function to create a user key to give to the child of current process

Parameters:

  • pid number The PID of the child
getUser ()
Returns the current user key

Returns:

    User current user
logout ()
Logouts and set account to guest (Shared).
getById (uid)
Get user object from ID

Parameters:

  • uid int User ID

Returns:

    User
createUser (username, ops)
Register a new user

Parameters:

  • username string
  • ops
    • password string The new user's password
    • algorithm string The algorithm for hashing the password (default "sha3-512")
login (username, passwd)
Login to a new user using given credentials

Parameters:

  • username string The username to login with
  • passwd string The password used to authenticate
generated by LDoc 1.4.6 Last updated 2021-12-27 19:58:59