Пример #1
0
 /**
  * Set the password of the user
  *
  * @param string $password
  * @param string $recoveryPassword for the encryption app to reset encryption keys
  * @return bool
  */
 public function setPassword($password, $recoveryPassword = null)
 {
     if ($this->emitter) {
         $this->emitter->emit('\\OC\\User', 'preSetPassword', array($this, $password, $recoveryPassword));
     }
     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));
         }
         return !($result === false);
     } else {
         return false;
     }
 }
Пример #2
0
 public function triggerChange($feature, $value = null)
 {
     if ($this->emitter) {
         $this->emitter->emit('\\OC\\User', 'changeUser', array($this, $feature, $value));
     }
 }
Пример #3
0
 public function triggerChange()
 {
     if ($this->emitter) {
         $this->emitter->emit('\\OC\\User', 'changeUser', array($this));
     }
 }