From 3febb60253f769839459b03b6ce4493acfbc4b32 Mon Sep 17 00:00:00 2001 From: iBNu Maksum Date: Fri, 18 Oct 2024 12:57:59 +0700 Subject: [PATCH] fix variable sms_otp_registration --- system/controllers/register.php | 6 +++--- ui/ui/app-settings.tpl | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/system/controllers/register.php b/system/controllers/register.php index 80bf5e16..e1737c10 100644 --- a/system/controllers/register.php +++ b/system/controllers/register.php @@ -22,7 +22,7 @@ switch ($do) { $password = _post('password'); $cpassword = _post('cpassword'); $address = _post('address'); - if (!empty($config['sms_url']) && $_c['allow_phone_otp'] == 'yes') { + if (!empty($config['sms_url']) && $_c['sms_otp_registration'] == 'yes') { $phonenumber = Lang::phoneFormat($username); $username = $phonenumber; } else if (strlen($username) < 21) { @@ -45,7 +45,7 @@ switch ($do) { $msg .= Lang::T('Passwords does not match') . '
'; } - if (!empty($config['sms_url']) && $_c['allow_phone_otp'] == 'yes') { + if (!empty($config['sms_url']) && $_c['sms_otp_registration'] == 'yes') { $otpPath .= sha1($username . $db_pass) . ".txt"; run_hook('validate_otp'); #HOOK //expired 10 minutes @@ -114,7 +114,7 @@ switch ($do) { break; default: - if (!empty($config['sms_url']) && $_c['allow_phone_otp'] == 'yes') { + if (!empty($config['sms_url']) && $_c['sms_otp_registration'] == 'yes') { $username = _post('username'); if (!empty($username)) { $d = ORM::for_table('tbl_customers')->where('username', $username)->find_one(); diff --git a/ui/ui/app-settings.tpl b/ui/ui/app-settings.tpl index 8aa5e3cb..b578ec9f 100644 --- a/ui/ui/app-settings.tpl +++ b/ui/ui/app-settings.tpl @@ -212,11 +212,11 @@
- -