Resulta que tengo nociones basicas, pero este es el codigo.
Código PHP:
$signup_logged_in = 0;
if($task != "step1" && $task != "step1do" && $task != "step2" && $task != "step2do")
{
if(isset($_COOKIE['signup_id']) && isset($_COOKIE['signup_email']) && isset($_COOKIE['signup_password']))
{
// GET USER ROW IF AVAILABLE
$user_id = $_COOKIE['signup_id'];
$new_user = new se_user(Array($user_id));
// VERIFY USER LOGIN COOKIE VALUES AND RESET USER LOGIN VARIABLE
//if($_COOKIE['signup_email'] == crypt($new_user->user_info['user_email'], "$1$".$new_user->user_info['user_code']."$") && $_COOKIE['signup_password'] == $new_user->user_info['user_password'])
$new_user->user_salt = $new_user->user_info['user_code'];
if( $_COOKIE['signup_email'] == $new_user->user_password_crypt($new_user->user_info['user_email']) && $_COOKIE['signup_password'] == $new_user->user_info['user_password'] )
{
$signup_logged_in = 1;
}
}
if($signup_logged_in != 1) { cheader("signup.php"); exit(); }
}
if($signup_logged_in != 1)
{
setcookie("signup_id", "", 0, "/");
setcookie("signup_email", "", 0, "/");
setcookie("signup_password", "", 0, "/");
$_COOKIE['signup_id'] = "";
$_COOKIE['signup_email'] = "";
$_COOKIE['signup_password'] = "";
$new_user = new se_user();
if($task == "step1")
{
if(isset($_GET['signup_email'])) { $signup_email = $_GET['signup_email']; } else { $signup_email = ""; }
if(isset($_GET['signup_invite'])) { $signup_invite = $_GET['signup_invite']; }
$signup_password = "";
$signup_timezone = $setting['setting_timezone'];
}
}
// PROCESS INPUT FROM FIRST STEP (OR DOUBLE CHECK VALUES), CONTINUE TO SECOND STEP (OR SECOND STEP PROCESSING)
if($task == "step1do" || $task == "step2do")
{
$signup_email = $_POST['signup_email'];
$signup_password = $_POST['signup_password'];
$signup_password2 = $_POST['signup_password2'];
$step = $_POST['step'];
if($task == "step2do" && $step != "1")
{
$signup_password = base64_decode($signup_password);
$signup_password2 = base64_decode($signup_password2);
}
$signup_username = $_POST['signup_username'];
$signup_timezone = $_POST['signup_timezone'];
$signup_invite = $_POST['signup_invite'];
$signup_cat = $_POST['signup_cat'];