From 414be27e076bdc1ce851c8a032ec83997815176e Mon Sep 17 00:00:00 2001 From: Rich Lott / Artful Robot Date: Fri, 29 Sep 2023 14:47:11 +0100 Subject: [PATCH] standalone: add stub for checkPasswordResetToken --- .../Civi/Standalone/Security.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ext/standaloneusers/Civi/Standalone/Security.php b/ext/standaloneusers/Civi/Standalone/Security.php index c0e8de0f84..0c6d6b2acc 100644 --- a/ext/standaloneusers/Civi/Standalone/Security.php +++ b/ext/standaloneusers/Civi/Standalone/Security.php @@ -3,6 +3,7 @@ namespace Civi\Standalone; use CRM_Core_Session; use Civi; +use Civi\Api4\User; /** * This is a single home for security related functions for Civi Standalone. @@ -363,4 +364,20 @@ class Security { return FALSE; } + /** + * Check a password reset token matches for a User. + * + * @param int $userID + * @param string $token + * @param bool $spend + * If TRUE, and the token matches, the token is then reset; so it can only be used once. + * If FALSE no changes are made. + * + * @return bool TRUE if it was valid. + */ + public function checkPasswordResetToken(int $userID, string $token, bool $spend = TRUE): bool { + // Coming in next PR! + return FALSE; + } + } -- 2.25.1