From 9078e22a511c2b0f628195144757625ceda9db92 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 1 Jun 2025 17:26:24 +0200 Subject: [PATCH] #441 SMS sending --- lam/lib/account.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index 9dfd04eb8..73beb27f2 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -1720,6 +1720,9 @@ function sendSmsTestMessage(string $providerId, ?string $apiKey, ?string $apiTok * @return string|null phone number if found */ function getSmsPhoneNumber(array $attributes): ?string { + if (empty($_SESSION['cfgMain']->smsProvider)) { + return null; + } $phoneAttributes = array_change_key_case($_SESSION['cfgMain']->getSmsAttributes()); $attributes = array_change_key_case($attributes); foreach ($phoneAttributes as $phoneAttribute) {