Fix otp registration as it still check is sms url exists, so i remove it

This commit is contained in:
iBNu Maksum 2024-11-21 10:09:36 +07:00
parent 27a5d2d45a
commit 63e564c9dd
No known key found for this signature in database
GPG Key ID: 7FC82848810579E5

View File

@ -27,7 +27,7 @@ switch ($do) {
$address = _post('address');
// Separate phone number input if OTP is required
if (!empty($config['sms_url']) && $_c['sms_otp_registration'] == 'yes') {
if ($config['sms_otp_registration'] == 'yes') {
$phone_number = alphanumeric(_post('phone_number'), "+_.@-");
} else {
$phone_number = $username; // When OTP is not required, treat username as phone number
@ -51,7 +51,7 @@ switch ($do) {
}
// OTP verification if OTP is enabled
if (!empty($config['sms_url']) && $_c['sms_otp_registration'] == 'yes') {
if ($_c['sms_otp_registration'] == 'yes') {
$otpPath .= sha1($phone_number . $db_pass) . ".txt";
run_hook('validate_otp'); #HOOK
// Expire after 10 minutes
@ -150,7 +150,7 @@ switch ($do) {
break;
default:
if (!empty($config['sms_url']) && $_c['sms_otp_registration'] == 'yes') {
if ($_c['sms_otp_registration'] == 'yes') {
$phone_number = _post('phone_number');
if (!empty($phone_number)) {
$d = ORM::for_table('tbl_customers')->where('username', $phone_number)->find_one();