mirror of
https://github.com/hotspotbilling/phpnuxbill.git
synced 2025-07-16 04:54:24 +02:00
Fix otp registration as it still check is sms url exists, so i remove it
This commit is contained in:
parent
27a5d2d45a
commit
63e564c9dd
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue