projects
/
GitHub
/
WoltLab
/
WCF.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72e2661
)
Add cancelLostPasswordRequest to UserAction
author
Tim Düsterhus
<duesterhus@woltlab.com>
Fri, 2 Jul 2021 08:36:18 +0000
(10:36 +0200)
committer
Tim Düsterhus
<duesterhus@woltlab.com>
Fri, 2 Jul 2021 09:24:51 +0000
(11:24 +0200)
wcfsetup/install/files/lib/data/user/UserAction.class.php
patch
|
blob
|
blame
|
history
wcfsetup/install/files/lib/system/event/listener/UserLoginCancelLostPasswordListener.class.php
patch
|
blob
|
blame
|
history
diff --git
a/wcfsetup/install/files/lib/data/user/UserAction.class.php
b/wcfsetup/install/files/lib/data/user/UserAction.class.php
index 2bb22707cddfe24e3a598bb6673d473807835218..a43fced14d9e65503198ac16741154c4471dadaf 100644
(file)
--- a/
wcfsetup/install/files/lib/data/user/UserAction.class.php
+++ b/
wcfsetup/install/files/lib/data/user/UserAction.class.php
@@
-1235,4
+1235,21
@@
class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
'languageID' => $this->parameters['languageID'],
]);
}
+
+ /**
+ * @since 5.5
+ */
+ public function cancelLostPasswordRequest(): void
+ {
+ if (empty($this->objects)) {
+ $this->readObjects();
+ }
+
+ foreach ($this->getObjects() as $userEditor) {
+ $userEditor->update([
+ 'lastLostPasswordRequestTime' => 0,
+ 'lostPasswordKey' => '',
+ ]);
+ }
+ }
}
diff --git
a/wcfsetup/install/files/lib/system/event/listener/UserLoginCancelLostPasswordListener.class.php
b/wcfsetup/install/files/lib/system/event/listener/UserLoginCancelLostPasswordListener.class.php
index 2ce062d429b2ce79fd144b6ba68cdb62057ee628..606190fa45b609caa6af11dc73269299de3f1847 100644
(file)
--- a/
wcfsetup/install/files/lib/system/event/listener/UserLoginCancelLostPasswordListener.class.php
+++ b/
wcfsetup/install/files/lib/system/event/listener/UserLoginCancelLostPasswordListener.class.php
@@
-23,15
+23,6
@@
final class UserLoginCancelLostPasswordListener
return;
}
- (new UserAction(
- [$user],
- 'update',
- [
- 'data' => [
- 'lastLostPasswordRequestTime' => 0,
- 'lostPasswordKey' => '',
- ],
- ]
- ))->executeAction();
+ (new UserAction([$user], 'cancelLostPasswordRequest'))->executeAction();
}
}