Catch the mail exceptions in public registration

Remove validity check for confirmed accounts
This commit is contained in:
Timothée Jaussoin 2022-08-29 16:59:43 +02:00
parent 3f9437ec3c
commit 487755acba
3 changed files with 6 additions and 7 deletions

View file

@ -153,7 +153,11 @@ class AccountController extends Controller
Log::channel('events')->info('API: Account created using the public endpoint by email', ['id' => $account->identifier]);
Mail::to($account)->send(new RegisterConfirmation($account));
try {
Mail::to($account)->send(new RegisterConfirmation($account));
} catch (\Exception $e) {
Log::error('Public Register Confirmation email not sent: ' . $e->getMessage());
}
}
// Full reload

View file

@ -57,11 +57,6 @@ class AuthenticateDigestOrKey
$resolvedRealm = config('app.realm') ?? $domain;
// Check if activated
if (!$account->activated) {
return $this->generateUnauthorizedResponse($account);
}
// Key authentication
if ($request->header('x-api-key') || $request->cookie('x-api-key')) {

View file

@ -8,7 +8,7 @@
#%define _datadir %{_datarootdir}
#%define _docdir %{_datadir}/doc
%define build_number 148
%define build_number 149
%define var_dir /var/opt/belledonne-communications
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager