From 07870d05ad088debde1fb30d3f4a5cdb508fb7af Mon Sep 17 00:00:00 2001 From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:58:13 +0100 Subject: [PATCH] Update accounts.php Fix OTP not sending bug --- system/controllers/accounts.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/system/controllers/accounts.php b/system/controllers/accounts.php index 51f31a30..f9e4767c 100644 --- a/system/controllers/accounts.php +++ b/system/controllers/accounts.php @@ -170,11 +170,11 @@ switch ($action) { file_put_contents($otpFile, $otp); file_put_contents($phoneFile, $phone); // send send OTP to user - if ($_c['phone_otp_type'] === 'sms') { + if ($config['phone_otp_type'] === 'sms') { Message::sendSMS($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); - } elseif ($_c['phone_otp_type'] === 'whatsapp') { + } elseif ($config['phone_otp_type'] === 'whatsapp') { Message::sendWhatsapp($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); - } elseif ($_c['phone_otp_type'] === 'both') { + } elseif ($config['phone_otp_type'] === 'both') { Message::sendSMS($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); Message::sendWhatsapp($phone, $config['CompanyName'] . "\n Your Verification code is: $otp"); }