diff options
Diffstat (limited to 'lib/private/user/user.php')
-rw-r--r-- | lib/private/user/user.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/user/user.php b/lib/private/user/user.php index 729abdc6227..9ad2f5f0d3a 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -90,7 +90,7 @@ class User implements IUser { public function getDisplayName() { if (!isset($this->displayName)) { $displayName = ''; - if ($this->backend and $this->backend->implementsActions(OC_USER_BACKEND_GET_DISPLAYNAME)) { + if ($this->backend and $this->backend->implementsActions(\OC_User_Backend::GET_DISPLAYNAME)) { // get display name and strip whitespace from the beginning and end of it $backendDisplayName = $this->backend->getDisplayName($this->uid); if (is_string($backendDisplayName)) { @@ -115,7 +115,7 @@ class User implements IUser { */ public function setDisplayName($displayName) { $displayName = trim($displayName); - if ($this->backend->implementsActions(\OC_USER_BACKEND_SET_DISPLAYNAME) && !empty($displayName)) { + if ($this->backend->implementsActions(\OC_User_Backend::SET_DISPLAYNAME) && !empty($displayName)) { $this->displayName = $displayName; $result = $this->backend->setDisplayName($this->uid, $displayName); return $result !== false; @@ -170,7 +170,7 @@ class User implements IUser { if ($this->emitter) { $this->emitter->emit('\OC\User', 'preSetPassword', array($this, $password, $recoveryPassword)); } - if ($this->backend->implementsActions(\OC_USER_BACKEND_SET_PASSWORD)) { + if ($this->backend->implementsActions(\OC_User_Backend::SET_PASSWORD)) { $result = $this->backend->setPassword($this->uid, $password); if ($this->emitter) { $this->emitter->emit('\OC\User', 'postSetPassword', array($this, $password, $recoveryPassword)); @@ -188,7 +188,7 @@ class User implements IUser { */ public function getHome() { if (!$this->home) { - if ($this->backend->implementsActions(\OC_USER_BACKEND_GET_HOME) and $home = $this->backend->getHome($this->uid)) { + if ($this->backend->implementsActions(\OC_User_Backend::GET_HOME) and $home = $this->backend->getHome($this->uid)) { $this->home = $home; } elseif ($this->config) { $this->home = $this->config->getSystemValue('datadirectory') . '/' . $this->uid; @@ -205,7 +205,7 @@ class User implements IUser { * @return bool */ public function canChangeAvatar() { - if ($this->backend->implementsActions(\OC_USER_BACKEND_PROVIDE_AVATAR)) { + if ($this->backend->implementsActions(\OC_User_Backend::PROVIDE_AVATAR)) { return $this->backend->canChangeAvatar($this->uid); } return true; @@ -217,7 +217,7 @@ class User implements IUser { * @return bool */ public function canChangePassword() { - return $this->backend->implementsActions(\OC_USER_BACKEND_SET_PASSWORD); + return $this->backend->implementsActions(\OC_User_Backend::SET_PASSWORD); } /** @@ -229,7 +229,7 @@ class User implements IUser { if ($this->config and $this->config->getSystemValue('allow_user_to_change_display_name') === false) { return false; } else { - return $this->backend->implementsActions(\OC_USER_BACKEND_SET_DISPLAYNAME); + return $this->backend->implementsActions(\OC_User_Backend::SET_DISPLAYNAME); } } |