diff --git a/flexiapi/app/Http/Controllers/Api/AccountController.php b/flexiapi/app/Http/Controllers/Api/AccountController.php index 8f70f72..bad6b96 100644 --- a/flexiapi/app/Http/Controllers/Api/AccountController.php +++ b/flexiapi/app/Http/Controllers/Api/AccountController.php @@ -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 diff --git a/flexiapi/app/Http/Middleware/AuthenticateDigestOrKey.php b/flexiapi/app/Http/Middleware/AuthenticateDigestOrKey.php index c4af902..7944c2c 100644 --- a/flexiapi/app/Http/Middleware/AuthenticateDigestOrKey.php +++ b/flexiapi/app/Http/Middleware/AuthenticateDigestOrKey.php @@ -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')) { diff --git a/flexisip-account-manager.spec b/flexisip-account-manager.spec index 01c0da2..f62caf5 100644 --- a/flexisip-account-manager.spec +++ b/flexisip-account-manager.spec @@ -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