Nextcloud PHP API (stable18)

IUser

Interface IUser

Tags
since
8.0.0

Table of Contents

canChangeAvatar()  : bool
check if the backend allows the user to change his avatar on Personal page
canChangeDisplayName()  : bool
check if the backend supports changing display names
canChangePassword()  : bool
check if the backend supports changing passwords
delete()  : bool
Delete the user
getAvatarImage()  : IImage|null
get the avatar image if it exists
getBackend()  : UserInterface
Get the backend for the current user object
getBackendClassName()  : string
Get the name of the backend class the user is connected with
getCloudId()  : string
get the federation cloud id
getDisplayName()  : string
get the display name for the user, if no specific display name is set it will fallback to the user id
getEMailAddress()  : string|null
get the users email address
getHome()  : string
get the users home folder to mount
getLastLogin()  : int
returns the timestamp of the user's last login or 0 if the user did never login
getQuota()  : string
get the users' quota in human readable form. If a specific quota is not set for the user, the default value is returned. If a default setting was not set otherwise, it is return as 'none', i.e. quota is not limited.
getUID()  : string
get the user id
isEnabled()  : bool
check if the user is enabled
setDisplayName()  : bool
set the display name for the user
setEMailAddress()  : void
set the email address of the user
setEnabled()  : mixed
set the enabled status for the user
setPassword()  : bool
Set the password of the user
setQuota()  : void
set the users' quota
updateLastLoginTimestamp()  : mixed
updates the timestamp of the most recent login of this user

Methods

canChangeAvatar()

check if the backend allows the user to change his avatar on Personal page

public canChangeAvatar() : bool
Tags
since
8.0.0
Return values
bool —

canChangeDisplayName()

check if the backend supports changing display names

public canChangeDisplayName() : bool
Tags
since
8.0.0
Return values
bool —

canChangePassword()

check if the backend supports changing passwords

public canChangePassword() : bool
Tags
since
8.0.0
Return values
bool —

delete()

Delete the user

public delete() : bool
Tags
since
8.0.0
Return values
bool —

getAvatarImage()

get the avatar image if it exists

public getAvatarImage(int $size) : IImage|null
Parameters
$size : int
Tags
since
9.0.0
Return values
IImage|null —

getBackendClassName()

Get the name of the backend class the user is connected with

public getBackendClassName() : string
Tags
since
8.0.0
Return values
string —

getCloudId()

get the federation cloud id

public getCloudId() : string
Tags
since
9.0.0
Return values
string —

getDisplayName()

get the display name for the user, if no specific display name is set it will fallback to the user id

public getDisplayName() : string
Tags
since
8.0.0
Return values
string —

getEMailAddress()

get the users email address

public getEMailAddress() : string|null
Tags
since
9.0.0
Return values
string|null —

getHome()

get the users home folder to mount

public getHome() : string
Tags
since
8.0.0
Return values
string —

getLastLogin()

returns the timestamp of the user's last login or 0 if the user did never login

public getLastLogin() : int
Tags
since
8.0.0
Return values
int —

getQuota()

get the users' quota in human readable form. If a specific quota is not set for the user, the default value is returned. If a default setting was not set otherwise, it is return as 'none', i.e. quota is not limited.

public getQuota() : string
Tags
since
9.0.0
Return values
string —

getUID()

get the user id

public getUID() : string
Tags
since
8.0.0
Return values
string —

isEnabled()

check if the user is enabled

public isEnabled() : bool
Tags
since
8.0.0
Return values
bool —

setDisplayName()

set the display name for the user

public setDisplayName(string $displayName) : bool
Parameters
$displayName : string
Tags
since
8.0.0
Return values
bool —

setEMailAddress()

set the email address of the user

public setEMailAddress(string|null $mailAddress) : void
Parameters
$mailAddress : string|null
Tags
since
9.0.0

setEnabled()

set the enabled status for the user

public setEnabled([bool $enabled = true ]) : mixed
Parameters
$enabled : bool = true
Tags
since
8.0.0
Return values
mixed —

setPassword()

Set the password of the user

public setPassword(string $password[, string $recoveryPassword = null ]) : bool
Parameters
$password : string
$recoveryPassword : string = null

for the encryption app to reset encryption keys

Tags
since
8.0.0
Return values
bool —

setQuota()

set the users' quota

public setQuota(string $quota) : void
Parameters
$quota : string
Tags
since
9.0.0

updateLastLoginTimestamp()

updates the timestamp of the most recent login of this user

public updateLastLoginTimestamp() : mixed
Tags
since
8.0.0
Return values
mixed —

Search results