Custom Fields for registration and Profile, but not yet finished for upload picture

This commit is contained in:
iBNu Maksum
2024-11-19 18:11:34 +07:00
parent 242dda2e99
commit eb970b257a
12 changed files with 311 additions and 11 deletions

View File

@ -86,7 +86,6 @@ switch ($do) {
}
if ($msg == '') {
run_hook('register_user'); #HOOK
$d = ORM::for_table('tbl_customers')->create();
$d->username = alphanumeric($username, "+_.@-");
$d->password = $password;
@ -96,6 +95,8 @@ switch ($do) {
$d->phonenumber = $phone_number;
if ($d->save()) {
$user = $d->id();
User::setFormCustomField($user);
run_hook('register_user'); #HOOK
r2(U . 'login', 's', Lang::T('Register Success! You can login now'));
} else {
$ui->assign('username', $username);
@ -163,6 +164,7 @@ switch ($do) {
$ui->assign('notify', 'Registration code has been sent to your phone');
$ui->assign('notify_t', 's');
$ui->assign('_title', Lang::T('Register'));
$ui->assign('customFields', User::getFormCustomField($ui, true));
$ui->display('customer/register-otp.tpl');
}
} else {
@ -171,6 +173,7 @@ switch ($do) {
$ui->display('customer/register-rotp.tpl');
}
} else {
$ui->assign('customFields', User::getFormCustomField($ui, true));
$ui->assign('username', "");
$ui->assign('fullname', "");
$ui->assign('address', "");