From fdaab7372ede9f09905a94e574a6b91beb2314ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Thu, 6 Jun 2013 13:30:18 +0200 Subject: [PATCH] always emit the preSetPassword hook, this should only indicate the intention. Finally the post-hooks indicate if it was successful or not --- lib/user/user.php | 6 +++--- 1 file 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)); -- 2.39.5