]> source.dussan.org Git - nextcloud-server.git/commitdiff
always emit the preSetPassword hook, this should only indicate the intention. Finally...
authorBjörn Schießle <schiessle@owncloud.com>
Thu, 6 Jun 2013 11:30:18 +0000 (13:30 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Thu, 6 Jun 2013 11:30:18 +0000 (13:30 +0200)
lib/user/user.php

index f9466b71499ff638e8d10e9293839b8d8bc77983..55d7848a979c80e8b229cb41949e22f979709ad3 100644 (file)
@@ -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));