Beispiel #1
0
 /**
  * set the displayname for the user
  *
  * @param string $displayName
  * @return bool
  */
 public function setDisplayName($displayName)
 {
     if ($this->canChangeDisplayName()) {
         $this->displayName = $displayName;
         $result = $this->backend->setDisplayName($this->uid, $displayName);
         return $result !== false;
     } else {
         return false;
     }
 }
Beispiel #2
0
 /**
  * set the displayname for the user
  *
  * @param string $displayName
  * @return bool
  */
 public function setDisplayName($displayName)
 {
     $displayName = trim($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;
     } else {
         return false;
     }
 }