aboutsummaryrefslogtreecommitdiffstats
path: root/lib/user
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-06 13:30:18 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-06-06 13:30:18 +0200
commitfdaab7372ede9f09905a94e574a6b91beb2314ea (patch)
tree5398f4e91613eaf5d0c3061476809ff4539ec513 /lib/user
parent97e05b71f8615e17ef07066df2b53896c794b5e9 (diff)
downloadnextcloud-server-fdaab7372ede9f09905a94e574a6b91beb2314ea.tar.gz
nextcloud-server-fdaab7372ede9f09905a94e574a6b91beb2314ea.zip
always emit the preSetPassword hook, this should only indicate the intention. Finally the post-hooks indicate if it was successful or not
Diffstat (limited to 'lib/user')
-rw-r--r--lib/user/user.php6
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));