IUser

interface OCP\IUser
Interface IUser
Implemented by:OC\User\User
Source:lib/public/IUser.php#37

Methods

public OCP\IUser::getUID()
get the user id
Source:lib/public/IUser.php#45
Returns:string
Since:8.0.0
public OCP\IUser::getDisplayName()
get the display name for the user, if no specific display name is set it will fallback to the user id
Source:lib/public/IUser.php#53
Returns:string
Since:8.0.0
public OCP\IUser::setDisplayName($displayName)
set the display name for the user
Source:

lib/public/IUser.php#62

Parameters:
  • $displayName (string)
Returns:

bool

Since:

8.0.0

public OCP\IUser::getLastLogin()
returns the timestamp of the user’s last login or 0 if the user did never
login
Source:lib/public/IUser.php#71
Returns:int
Since:8.0.0
public OCP\IUser::updateLastLoginTimestamp()
updates the timestamp of the most recent login of this user
Source:lib/public/IUser.php#77
Since:8.0.0
public OCP\IUser::delete()
Delete the user
Source:lib/public/IUser.php#85
Returns:bool
Since:8.0.0
public OCP\IUser::setPassword($password, $recoveryPassword=null)
Set the password of the user
Source:

lib/public/IUser.php#95

Parameters:
  • $password (string)
  • $recoveryPassword (string) for the encryption app to reset encryption keys
Returns:

bool

Since:

8.0.0

public OCP\IUser::getHome()
get the users home folder to mount
Source:lib/public/IUser.php#103
Returns:string
Since:8.0.0
public OCP\IUser::getBackendClassName()
Get the name of the backend class the user is connected with
Source:lib/public/IUser.php#111
Returns:string
Since:8.0.0
public OCP\IUser::getBackend()
Get the backend for the current user object
Source:lib/public/IUser.php#119
Returns:\OCP\UserInterface
Since:15.0.0
public OCP\IUser::canChangeAvatar()
check if the backend allows the user to change his avatar on Personal page
Source:lib/public/IUser.php#127
Returns:bool
Since:8.0.0
public OCP\IUser::canChangePassword()
check if the backend supports changing passwords
Source:lib/public/IUser.php#135
Returns:bool
Since:8.0.0
public OCP\IUser::canChangeDisplayName()
check if the backend supports changing display names
Source:lib/public/IUser.php#143
Returns:bool
Since:8.0.0
public OCP\IUser::isEnabled()
check if the user is enabled
Source:lib/public/IUser.php#151
Returns:bool
Since:8.0.0
public OCP\IUser::setEnabled($enabled=true)
set the enabled status for the user
Source:

lib/public/IUser.php#159

Parameters:
  • $enabled (bool)
Since:

8.0.0

public OCP\IUser::getEMailAddress()
get the users email address
Source:lib/public/IUser.php#167
Returns:string | null
Since:9.0.0
public OCP\IUser::getAvatarImage($size)
get the avatar image if it exists
Source:

lib/public/IUser.php#176

Parameters:
  • $size (int)
Returns:

\OCP\IImage | null

Since:

9.0.0

public OCP\IUser::getCloudId()
get the federation cloud id
Source:lib/public/IUser.php#184
Returns:string
Since:9.0.0
public OCP\IUser::setEMailAddress($mailAddress)
set the email address of the user
Source:

lib/public/IUser.php#193

Parameters:
  • $mailAddress (string | null)
Returns:

void

Since:

9.0.0

public OCP\IUser::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.
Source:lib/public/IUser.php#203
Returns:string
Since:9.0.0
public OCP\IUser::setQuota($quota)
set the users’ quota
Source:

lib/public/IUser.php#212

Parameters:
  • $quota (string)
Returns:

void

Since:

9.0.0