예제 #1
0
파일: user.php 프로젝트: kenwi/core
 /**
  * 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;
     }
 }
예제 #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)) {
         $result = $this->backend->setDisplayName($this->uid, $displayName);
         if ($result) {
             $this->displayName = $displayName;
             $this->triggerChange('displayName', $displayName);
         }
         return $result !== false;
     } else {
         return false;
     }
 }
예제 #3
0
파일: user.php 프로젝트: RomanKreisel/core
 /**
  * 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)) {
         $result = $this->backend->setDisplayName($this->uid, $displayName);
         if ($result) {
             $this->displayName = $displayName;
             if ($this->emitter) {
                 $this->emitter->emit('\\OC\\User', 'changeUser', array($this));
             }
         }
         return $result !== false;
     } else {
         return false;
     }
 }