always emit the preSetPassword hook, this should only indicate the intention. Finally the post-hooks indicate if it was successful or not
This commit is contained in:
parent
97e05b71f8
commit
fdaab7372e
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue