We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a09f4ce commit 7cb199bCopy full SHA for 7cb199b
src/libraries/User.php
@@ -475,6 +475,22 @@ public function getVerifierToken() {
475
return $this->verifier_token;
476
}
477
478
+ public static function invalidateVerificationToken() {
479
+ if (!isset(Common::$database)) {
480
+ Common::$database = DatabaseDriver::getDatabaseObject();
481
+ }
482
+
483
+ $stmt = Common::$database->prepare(
484
+ 'UPDATE `users` SET `verifier_token` = NULL WHERE `id` = :id LIMIT 1;'
485
+ );
486
487
+ $stmt->bindParam(':id', $this->id, PDO::PARAM_INT);
488
+ $successful = $stmt->execute();
489
490
+ $stmt->closeCursor();
491
+ return $successful;
492
493
494
public function isDisabled() {
495
return ($this->options_bitmask & self::OPTION_DISABLED);
496
0 commit comments