Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface User

Hierarchy

  • User

Index

Properties

ID

ID: String

Describes the internal user ID.

fullName

fullName: String

Describes the user full name.

name

name: String

Describe the user name.

storage

Defines the user storage object. This object is maintained as long as the server is alive. It is not stored after the server shuts down. This property is user-related and not session-related.

directory.currentUser.storage.setItem( 'itemInBox', 19 );
var result = directory.currentUser.storage.getItem( 'itemInBox' );
console.log(result);
// 19

Methods

getParents

  • getParents(level?: Boolean): Array<Group>
  • Get all groups where the user belongs to.

    Parameters

    • Optional level: Boolean

      (default: false) Set to true if you want first level results. Set to false otherwise.

    Returns Array<Group>

    Returns an array of group

putInto

  • putInto(...groupList: String[]): void
  • putInto(...groupList: Group[]): void
  • Assignes a user to one or more groups.

    myUser.putInto( 'sales', 'finance' );
    warning

    All updates done to the directory are temporary. Use directory.save() to save all updates on disk.

    Parameters

    • Rest ...groupList: String[]

      Describes an array of group name

    Returns void

  • Assignes a user to one or more groups.

    var group1 = directory.group( 'finance' );
    var group2 = directory.addGroup( 'account' );
    myUser.putInto( group1 , group2 )
    warning

    All updates done to the directory are temporary. Use directory.save() to save all updates on disk.

    Parameters

    • Rest ...groupList: Group[]

      Describes an array of group object

    Returns void

remove

  • remove(): void
  • Removes the user from the directory.

    warning

    All updates done to the directory are temporary. Use directory.save() to save all updates on disk.

    Returns void

removeFrom

  • removeFrom(...groupList: String[]): void
  • removeFrom(...groupList: Group[]): void
  • Removes the user from group list.

    myUser.removeFrom( 'sales', 'finance' );
    warning

    All updates done to the directory are temporary. Use directory.save() to save all updates on disk.

    Parameters

    • Rest ...groupList: String[]

      Describes an array of group name

    Returns void

  • Removes the user from group list.

    var group1 = directory.group( 'finance' );
    var group2 = directory.addGroup( 'account' );
    myUser.removeFrom( group1 , group2 )
    warning

    All updates done to the directory are temporary. Use directory.save() to save all updates on disk.

    Parameters

    • Rest ...groupList: Group[]

      Describes an array of group object

    Returns void

setPassword

  • setPassword(password: String): void
  • Update the user password in the directory.

    warning

    All updates done to the directory are temporary. Use directory.save() to save all updates on disk.

    Parameters

    • password: String

      The new password to save

    Returns void