diff --git a/lib/private/Security/VerificationToken/VerificationToken.php b/lib/private/Security/VerificationToken/VerificationToken.php index 5f606d0e04901..2625d1fe0154c 100644 --- a/lib/private/Security/VerificationToken/VerificationToken.php +++ b/lib/private/Security/VerificationToken/VerificationToken.php @@ -101,6 +101,7 @@ public function create( IUser $user, string $subject, string $passwordPrefix = '', + int $expirationTime = self::TOKEN_LIFETIME * 2 ): string { $token = $this->secureRandom->generate( 21, @@ -115,7 +116,7 @@ public function create( 'userId' => $user->getUID(), 'subject' => $subject, 'pp' => $passwordPrefix, - 'notBefore' => $this->timeFactory->getTime() + self::TOKEN_LIFETIME * 2, // multiply to provide a grace period + 'notBefore' => $this->timeFactory->getTime() + $expirationTime, // multiply to provide a grace period ]); $this->jobList->add(CleanUpJob::class, $jobArgs);