From: Björn Schießle Date: Thu, 6 Jun 2013 11:30:18 +0000 (+0200) Subject: always emit the preSetPassword hook, this should only indicate the intention. Finally... X-Git-Tag: v6.0.0alpha2~669^2~1 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fdaab7372ede9f09905a94e574a6b91beb2314ea;p=nextcloud-server.git always emit the preSetPassword hook, this should only indicate the intention. Finally the post-hooks indicate if it was successful or not --- diff --git a/lib/user/user.php b/lib/user/user.php index f9466b71499..55d7848a979 100644 --- a/lib/user/user.php +++ b/lib/user/user.php @@ -131,10 +131,10 @@ class User { * @return bool */ public function setPassword($password, $recoveryPassword) { + if ($this->emitter) { + $this->emitter->emit('\OC\User', 'preSetPassword', array($this, $password, $recoveryPassword)); + } if ($this->backend->implementsActions(\OC_USER_BACKEND_SET_PASSWORD)) { - if ($this->emitter) { - $this->emitter->emit('\OC\User', 'preSetPassword', array($this, $password, $recoveryPassword)); - } $result = $this->backend->setPassword($this->uid, $password); if ($this->emitter) { $this->emitter->emit('\OC\User', 'postSetPassword', array($this, $password, $recoveryPassword));