diff options
Diffstat (limited to 'lib/user')
-rw-r--r-- | lib/user/user.php | 6 |
1 files changed, 3 insertions, 3 deletions
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)); |