Ejemplo n.º 1
0
    }
    if (isset($email)) {
        $main_smarty->assign('reg_email', htmlspecialchars($email, ENT_QUOTES));
    }
    if (isset($password)) {
        $main_smarty->assign('reg_password', htmlspecialchars($password, ENT_QUOTES));
    }
    if (isset($password2)) {
        $main_smarty->assign('reg_password2', htmlspecialchars($password2, ENT_QUOTES));
    }
    if (isset($user_language)) {
        $main_smarty->assign('user_language', htmlspecialchars($user_language, ENT_QUOTES));
    }
    $error = register_check_errors($username, $email, $password, $password2, $user_language);
    if ($error == false) {
        register_add_user($username, $email, $password, $password2, $user_language);
    } else {
        //		print "Error";
        print_r($form_email_error);
    }
} else {
    $testing = false;
    // changing to true will populate the form with random variables for testing.
    if ($testing == true) {
        $main_smarty->assign('reg_username', mt_rand(1111111, 9999999));
        $main_smarty->assign('reg_email', mt_rand(1111111, 9999999) . '@test.com');
        $main_smarty->assign('reg_password', '12345');
        $main_smarty->assign('reg_password2', '12345');
    }
}
$vars = '';
Ejemplo n.º 2
0
    }
    if (isset($username)) {
        $main_smarty->assign('reg_username', $username);
    }
    if (isset($email)) {
        $main_smarty->assign('reg_email', $email);
    }
    if (isset($password)) {
        $main_smarty->assign('reg_password', $password);
    }
    if (isset($password2)) {
        $main_smarty->assign('reg_password2', $password2);
    }
    $error = register_check_errors($username, $email, $password, $password2);
    if ($error == false) {
        register_add_user($username, $email, $password, $password2);
    }
} else {
    $testing = false;
    // changing to true will populate the form with random variables for testing.
    if ($testing == true) {
        $main_smarty->assign('reg_username', mt_rand(1111111, 9999999));
        $main_smarty->assign('reg_email', mt_rand(1111111, 9999999) . '@test.com');
        $main_smarty->assign('reg_password', '12345');
        $main_smarty->assign('reg_password2', '12345');
    }
}
$vars = '';
check_actions('register_showform', $vars);
$main_smarty->assign('tpl_center', $the_template . '/register_center');
$main_smarty->display($the_template . '/pligg.tpl');