diff --git a/system/controllers/register.php b/system/controllers/register.php index f554be4d..5f41f97f 100644 --- a/system/controllers/register.php +++ b/system/controllers/register.php @@ -20,12 +20,15 @@ switch ($do) { case 'post': $otp_code = _post('otp_code'); $username = alphanumeric(_post('username'),"+_."); + $email = _post('email'); $fullname = _post('fullname'); $password = _post('password'); $cpassword = _post('cpassword'); $address = _post('address'); if(!empty($config['sms_url'])){ $phonenumber = $username; + }else if(strlen($username)<21){ + $phonenumber = $username; } $msg = ''; if (Validator::Length($username, 35, 2) == false) { @@ -37,6 +40,9 @@ switch ($do) { if (!Validator::Length($password, 35, 2)) { $msg .= 'Password should be between 3 to 35 characters' . '
'; } + if (!Validator::Email($email)) { + $msg .= 'Email is not Valid
'; + } if ($password != $cpassword) { $msg .= $_L['PasswordsNotMatch'] . '
'; } @@ -53,6 +59,7 @@ switch ($do) { $ui->assign('username', $username); $ui->assign('fullname', $fullname); $ui->assign('address', $address); + $ui->assign('email', $email); $ui->assign('phonenumber', $phonenumber); $ui->assign('notify', '
+
+ + +
diff --git a/ui/ui/register-rotp.tpl b/ui/ui/register-rotp.tpl index d01cca02..a9a99e6c 100644 --- a/ui/ui/register-rotp.tpl +++ b/ui/ui/register-rotp.tpl @@ -63,11 +63,11 @@
- + {$_L['Cancel']}
- {$_L['Cancel']} +
diff --git a/ui/ui/register.tpl b/ui/ui/register.tpl index 8e88d9d1..849c1c01 100644 --- a/ui/ui/register.tpl +++ b/ui/ui/register.tpl @@ -43,19 +43,25 @@
1. {$_L['Register_Member']}
-
- +
+
- + +
+
+ +
- +
@@ -67,21 +73,23 @@
- +
- +
+
+
-
-