Skip to content

Commit 6dce555

Browse files
committed
Fixing scrutinizer issues re unneeded variables secret and status_mfa
1 parent 68eb190 commit 6dce555

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

app/Http/RequestHandlers/RegisterAction.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,13 @@ public function handle(ServerRequestInterface $request): ResponseInterface
9696
$password = Validator::parsedBody($request)->string('password');
9797
$realname = Validator::parsedBody($request)->string('realname');
9898
$username = Validator::parsedBody($request)->string('username');
99-
$secret = Validator::parsedBody($request)->string('secret');
10099

101100
try {
102101
if ($this->captcha_service->isRobot($request)) {
103102
throw new Exception(I18N::translate('Please try again.'));
104103
}
105104

106-
$this->doValidateRegistration($request, $username, $email, $realname, $comments, $password, $secret);
105+
$this->doValidateRegistration($request, $username, $email, $realname, $comments, $password);
107106

108107
Session::forget('register_comments');
109108
Session::forget('register_email');
@@ -249,8 +248,7 @@ private function doValidateRegistration(
249248
string $email,
250249
string $realname,
251250
string $comments,
252-
#[\SensitiveParameter] string $password,
253-
string $secret
251+
#[\SensitiveParameter] string $password
254252
): void {
255253
// All fields are required
256254
if ($username === '' || $email === '' || $realname === '' || $comments === '' || $password === '') {

app/Http/RequestHandlers/UserAddAction.php

-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ public function handle(ServerRequestInterface $request): ResponseInterface
5959
$real_name = Validator::parsedBody($request)->string('real_name');
6060
$email = Validator::parsedBody($request)->string('email');
6161
$password = Validator::parsedBody($request)->string('password');
62-
$secret = "";
6362

6463
$errors = false;
6564

app/Http/RequestHandlers/UserEditAction.php

-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ public function handle(ServerRequestInterface $request): ResponseInterface
7575
$real_name = Validator::parsedBody($request)->string('real_name');
7676
$email = Validator::parsedBody($request)->string('email');
7777
$password = Validator::parsedBody($request)->string('password');
78-
$secret = Validator::parsedBody($request)->string('secret');
7978
$theme = Validator::parsedBody($request)->string('theme');
8079
$language = Validator::parsedBody($request)->string('language');
8180
$timezone = Validator::parsedBody($request)->string('timezone');
@@ -85,7 +84,6 @@ public function handle(ServerRequestInterface $request): ResponseInterface
8584
$canadmin = Validator::parsedBody($request)->boolean('canadmin', false);
8685
$visible_online = Validator::parsedBody($request)->boolean('visible-online', false);
8786
$verified = Validator::parsedBody($request)->boolean('verified', false);
88-
$status_mfa = Validator::parsedBody($request)->boolean('status-mfa', false);
8987
$approved = Validator::parsedBody($request)->boolean('approved', false);
9088

9189
$edit_user = $this->user_service->find($user_id);

0 commit comments

Comments
 (0)