Skip to content
Snippets Groups Projects
Commit fdaab737 authored by Björn Schießle's avatar Björn Schießle
Browse files

always emit the preSetPassword hook, this should only indicate the intention....

always emit the preSetPassword hook, this should only indicate the intention. Finally the post-hooks indicate if it was successful or not
parent 97e05b71
No related branches found
No related tags found
No related merge requests found
......@@ -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));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment