Skip to content

Commit 94d8936

Browse files
committed
chore: update user locked wording
add support contact link Change-Id: I76ba937f258b1ff59d53a86bfccf40dd9ea974a4
1 parent 2c9bc79 commit 94d8936

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

app/Http/Controllers/UserController.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use App\Services\Auth\IUserService as AuthUserService;
2424
use Exception;
2525
use Illuminate\Http\Request as LaravelRequest;
26+
use Illuminate\Support\Facades\Config;
2627
use Illuminate\Support\Facades\Request;
2728
use Illuminate\Support\Facades\Log;
2829
use Illuminate\Support\Facades\Redirect;
@@ -314,7 +315,14 @@ public function emitOTP()
314315
$user = $this->auth_service->getUserByUsername($username);
315316

316317
if (!$user->isActive())
317-
throw new ValidationException("Your user account is currently locked. Please contact support for further assistance.");
318+
throw new ValidationException
319+
(
320+
sprintf
321+
(
322+
"Your user account is currently locked. Please <a href='mailto:%s'>contact support</a> for further assistance.",
323+
Config::get("app.help_email")
324+
)
325+
);
318326

319327
$client = null;
320328

app/Services/OAuth2/TokenService.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
use Auth\Exceptions\AuthenticationException;
2525
use Auth\User;
2626
use Illuminate\Support\Facades\Cache;
27+
use Illuminate\Support\Facades\Config;
2728
use Illuminate\Support\Facades\Event;
2829
use Illuminate\Support\Facades\Log;
2930
use jwa\cryptographic_algorithms\HashFunctionAlgorithm;
@@ -1742,7 +1743,14 @@ public function createOTPFromRequest(OAuth2PasswordlessAuthenticationRequest $re
17421743
);
17431744
AddUserAction::dispatch($user->getId(), IPHelper::getUserIp(), "Requested OTP");
17441745
if (!$user->isActive())
1745-
throw new ValidationException("Your user account is currently locked. Please contact support for further assistance.");
1746+
throw new ValidationException
1747+
(
1748+
sprintf
1749+
(
1750+
"Your user account is currently locked. Please <a href='mailto:%s'>contact support</a> for further assistance.",
1751+
Config::get("app.help_email")
1752+
)
1753+
);
17461754
}
17471755
return $otp;
17481756
});
@@ -1786,7 +1794,14 @@ public function createOTPFromPayload(array $payload, ?Client $client): OAuth2OTP
17861794
);
17871795
AddUserAction::dispatch($user->getId(), IPHelper::getUserIp(), "Requested OTP");
17881796
if (!$user->isActive())
1789-
throw new ValidationException("Your user account is currently locked. Please contact support for further assistance.");
1797+
throw new ValidationException
1798+
(
1799+
sprintf
1800+
(
1801+
"Your user account is currently locked. Please <a href='mailto:%s'>contact support</a> for further assistance.",
1802+
Config::get("app.help_email")
1803+
)
1804+
);
17901805
}
17911806
if (is_null($client)) {
17921807
$this->otp_repository->add($otp);

0 commit comments

Comments
 (0)