diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-10-24 15:41:44 +0400 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-17 19:50:19 +0300 |
commit | 357465eac9733530c8e78ff0d5e1abca04ac93db (patch) | |
tree | ca84071d21b3dfc1344c6aa8f315bef0fd9237e6 /core | |
parent | 767b08c6699e88a669b97246497d5315c6a6c063 (diff) |
Add "postPasswordReset" hook
Diffstat (limited to 'core')
-rw-r--r-- | core/lostpassword/controller/lostcontroller.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/lostpassword/controller/lostcontroller.php b/core/lostpassword/controller/lostcontroller.php index ec52108ad49..0a78063cc34 100644 --- a/core/lostpassword/controller/lostcontroller.php +++ b/core/lostpassword/controller/lostcontroller.php @@ -22,6 +22,8 @@ use OCP\Security\StringUtils; /** * Class LostController * + * Successfully changing a password will emit the post_passwordReset hook. + * * @package OC\Core\LostPassword\Controller */ class LostController extends Controller { @@ -47,13 +49,13 @@ class LostController extends Controller { * @param string $appName * @param IRequest $request * @param IURLGenerator $urlGenerator - * @param $userManager - * @param $defaults + * @param IUserManager $userManager + * @param OC_Defaults $defaults * @param IL10N $l10n * @param IConfig $config * @param ISecureRandom $secureRandom - * @param $from - * @param $isDataEncrypted + * @param string $from + * @param string $isDataEncrypted */ public function __construct($appName, IRequest $request, @@ -154,6 +156,8 @@ class LostController extends Controller { throw new \Exception(); } + \OC_Hook::emit('\OC\Core\LostPassword\Controller\LostController', 'post_passwordReset', array($userId)); + $this->config->deleteUserValue($userId, 'owncloud', 'lostpassword'); @\OC_User::unsetMagicInCookie(); |