Options
All
  • Public
  • Public/Protected
  • All
Menu

Class User

The user class represents a user in nextcloud. async getGroups async isDisabled async getLastLogin async getEmail getId async getDisplayName

Hierarchy

  • User

Index

Constructors

constructor

  • the conscructor of the user should only me invoked by the Client

    Parameters

    Returns User

Properties

Readonly id

id: string

Methods

addToMemberUserGroup

  • addToMemberUserGroup(userGroup: UserGroup): Promise<void>
  • adds the user to a user group as member

    async
    throws

    {UserNotFoundError}

    throws

    {UserGroupDoesNotExistError}

    throws

    {InsufficientPrivilegesError}

    throws

    {OperationFailedError}

    Parameters

    Returns Promise<void>

delete

  • delete(): Promise<void>
  • deletes a user

    async
    throws

    {UserNotFoundError}

    Returns Promise<void>

demoteFromSubadminUserGroup

  • demoteFromSubadminUserGroup(userGroup: UserGroup): Promise<void>
  • demote the user from beeing a subadmin of the user group

    async
    throws

    {UserNotFoundError}

    throws

    {UserGroupDoesNotExistError}

    throws

    {InsufficientPrivilegesError}

    throws

    {OperationFailedError}

    Parameters

    Returns Promise<void>

demoteFromSuperAdmin

  • demoteFromSuperAdmin(): Promise<void>
  • demote user from being a super admin

    async
    throws

    {UserNotFoundError}

    throws

    {UserGroupDoesNotExistError}

    throws

    {InsufficientPrivilegesError}

    throws

    {OperationFailedError}

    Returns Promise<void>

disable

  • disable(): Promise<void>
  • disables the user

    async
    throws

    {UserNotFoundError}

    Returns Promise<void>

enable

  • enable(): Promise<void>
  • enables the user

    async
    throws

    {UserNotFoundError}

    Returns Promise<void>

getAddress

  • getAddress(): Promise<string>
  • returns the phone number

    async
    throws

    {UserNotFoundError}

    Returns Promise<string>

    address

getDisplayName

  • getDisplayName(): Promise<string>
  • returns the display name

    async
    throws

    {UserNotFoundError}

    Returns Promise<string>

    display name

getEmail

  • getEmail(): Promise<string>
  • returns the email address

    async
    throws

    {UserNotFoundError}

    Returns Promise<string>

    email adress

getLanguage

  • getLanguage(): Promise<string>
  • returns the langauge code

    async
    throws

    {UserNotFoundError}

    Returns Promise<string>

    language code

getLastLogin

  • getLastLogin(): Promise<Date | null>
  • get the last login date or null if the user has not been logged in yet

    async
    throws

    {UserNotFoundError}

    Returns Promise<Date | null>

    last login date or null if the user has not been logged in yet

getLocale

  • getLocale(): Promise<string>
  • returns the locale

    async
    throws

    {UserNotFoundError}

    Returns Promise<string>

    locale

getMemberUserGroupIds

  • getMemberUserGroupIds(): Promise<string[]>
  • returns a list of user group ids where the user is member

    async
    throws

    {UserNotFoundError}

    Returns Promise<string[]>

    a list of user group ids where the user is member

getMemberUserGroups

  • getMemberUserGroups(): Promise<UserGroup[]>
  • returns a list of user groups where the user is member

    async
    throws

    {UserNotFoundError}

    Returns Promise<UserGroup[]>

    a list of user groups where the user is member

getPhone

  • getPhone(): Promise<string>
  • returns the phone number

    async
    throws

    {UserNotFoundError}

    Returns Promise<string>

    phone number

getQuota

getQuotaUserFriendly

getSubadminUserGroupIds

  • getSubadminUserGroupIds(): Promise<string[]>
  • returns a list of user group ids where the user is subadmin

    async
    throws

    {UserNotFoundError}

    Returns Promise<string[]>

    a list of user group ids where the user is subadmin

getSubadminUserGroups

  • getSubadminUserGroups(): Promise<UserGroup[]>
  • returns a list of user groups where the user is subadmin

    async
    throws

    {UserNotFoundError}

    Returns Promise<UserGroup[]>

    a list of user groups where the user is subadmin

getTwitter

  • getTwitter(): Promise<string>
  • returns the twitter handle

    async
    throws

    {UserNotFoundError}

    Returns Promise<string>

    twitter handle

getWebsite

  • getWebsite(): Promise<string>
  • returns the website

    async
    throws

    {UserNotFoundError}

    Returns Promise<string>

    website

isEnabled

  • isEnabled(): Promise<boolean>
  • returns true if the user is enabled

    async
    throws

    {UserNotFoundError}

    Returns Promise<boolean>

    true if the user is enabled

isSuperAdmin

  • isSuperAdmin(): Promise<boolean>
  • true if the user is a superadmin

    async
    throws

    {UserNotFoundError}

    Returns Promise<boolean>

    true if the user is a superadmin

promoteToSuperAdmin

  • promoteToSuperAdmin(): Promise<void>
  • promote user to super admin

    async
    throws

    {UserNotFoundError}

    throws

    {UserGroupDoesNotExistError}

    throws

    {InsufficientPrivilegesError}

    throws

    {OperationFailedError}

    Returns Promise<void>

promoteToUserGroupSubadmin

  • promoteToUserGroupSubadmin(userGroup: UserGroup): Promise<void>
  • promote the user to be a subadmin of the user group

    async
    throws

    {UserNotFoundError}

    throws

    {UserGroupDoesNotExistError}

    throws

    {InsufficientPrivilegesError}

    throws

    {OperationFailedError}

    Parameters

    Returns Promise<void>

removeFromMemberUserGroup

  • removeFromMemberUserGroup(userGroup: UserGroup): Promise<void>
  • remove the user from a user group as member

    async
    throws

    {UserNotFoundError}

    throws

    {UserGroupDoesNotExistError}

    throws

    {InsufficientPrivilegesError}

    throws

    {OperationFailedError}

    Parameters

    Returns Promise<void>

resendWelcomeEmail

  • resendWelcomeEmail(): Promise<void>
  • resends the welcome email

    async
    throws

    {UserResendWelcomeEmailError}

    Returns Promise<void>

setAddress

  • setAddress(value: string): Promise<void>
  • set the address

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the address

    Returns Promise<void>

setDisplayName

  • setDisplayName(value: string): Promise<void>
  • set the display name

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the display name

    Returns Promise<void>

setEmail

  • setEmail(value: string): Promise<void>
  • set the email address

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the email address

    Returns Promise<void>

setLanguage

  • setLanguage(value: string): Promise<void>
  • set the language code like EN, DE, FR...

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the language code

    Returns Promise<void>

setLocale

  • setLocale(value: string): Promise<void>
  • set the locale like EN, DE, FR...

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the locale

    Returns Promise<void>

setPassword

  • setPassword(value: string): Promise<void>
  • set the password

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the password

    Returns Promise<void>

setPhone

  • setPhone(value: string): Promise<void>
  • set phone number

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the phone number

    Returns Promise<void>

setQuota

  • setQuota(value: string): Promise<void>
  • sets the quota limit of the user

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the quota string like "1 GB", "100 MB"

    Returns Promise<void>

setTwitter

  • setTwitter(value: string): Promise<void>
  • set the twitter handle

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the twitter handle

    Returns Promise<void>

setWebsite

  • setWebsite(value: string): Promise<void>
  • set the website

    async
    throws

    {UserNotFoundError}

    throws

    {UserUpdateError}

    Parameters

    • value: string

      the website

    Returns Promise<void>

Generated using TypeDoc