Skip to content

Commit 210cd65

Browse files
author
jessevz
committed
Fixed error by adding abstract function to resetUserPassword helper
1 parent 13c65a1 commit 210cd65

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/inc/apiv2/helper/resetUserPassword.routes.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ public function getRequiredPermissions(string $method): array {
2121
public function preCommon(ServerRequestInterface $request): void {
2222
// nothing, there is no user for this request as it is an unauthenticated request
2323
}
24+
25+
public static function getResponse(): array {
26+
return ["Reset" => "Success"];
27+
}
2428

2529
public function getFormFields(): array {
2630
return [
@@ -32,7 +36,7 @@ public function getFormFields(): array {
3236
public function actionPost($data): array|null {
3337
UserUtils::userForgotPassword($data[User::USERNAME], $data[User::EMAIL]);
3438

35-
return ["reset" => "success"];
39+
return $this->getResponse();
3640
}
3741
}
3842

0 commit comments

Comments
 (0)