forked from kevinowino869/mitrobill
Phone otp update from customer
This commit is contained in:
@ -119,6 +119,7 @@ switch ($action) {
|
||||
if ($d) {
|
||||
//run_hook('customer_view_edit_profile'); #HOOK
|
||||
$ui->assign('d', $d);
|
||||
$ui->assign('new_phone', $_SESSION['new_phone']);
|
||||
$ui->display('user-phone-update.tpl');
|
||||
} else {
|
||||
r2(U . 'home', 'e', Lang::T('Account Not Found'));
|
||||
@ -129,7 +130,7 @@ switch ($action) {
|
||||
$phone = Lang::phoneFormat(_post('phone'));
|
||||
$username = $user['username'];
|
||||
$otpPath = $CACHE_PATH . '/sms/';
|
||||
|
||||
$_SESSION['new_phone'] = $phone;
|
||||
// Validate the phone number format
|
||||
if (!preg_match('/^[0-9]{10,}$/', $phone)) {
|
||||
r2(U . 'accounts/phone-update', 'e', Lang::T('Invalid phone number format'));
|
||||
|
@ -247,9 +247,16 @@ switch ($action) {
|
||||
$ui->assign('d', $d);
|
||||
$p = ORM::for_table('tbl_plans')->find_one($d['plan_id']);
|
||||
if (in_array($admin['user_type'], array('SuperAdmin', 'Admin'))) {
|
||||
$ps = ORM::for_table('tbl_plans')->where('type', $p['type'])->where('is_radius', $p['is_radius'])->find_many();
|
||||
$ps = ORM::for_table('tbl_plans')
|
||||
->where('type', $p['type'])
|
||||
->where('is_radius', $p['is_radius'])
|
||||
->find_many();
|
||||
} else {
|
||||
$ps = ORM::for_table('tbl_plans')->where("enabled", 1)->where('is_radius', $p['is_radius'])->where('type', $p['type'])->find_many();
|
||||
$ps = ORM::for_table('tbl_plans')
|
||||
->where("enabled", 1)
|
||||
->where('is_radius', $p['is_radius'])
|
||||
->where('type', $p['type'])
|
||||
->find_many();
|
||||
}
|
||||
$ui->assign('p', $ps);
|
||||
run_hook('view_edit_customer_plan'); #HOOK
|
||||
|
Reference in New Issue
Block a user