$user_password = $_POST['user_password']; $user_enabled = $_POST['user_enabled']; $user_level_id = $_POST['user_level_id']; $user_profilecat_id = $_POST['user_profilecat_id']; $user_invitesleft = $_POST['user_invitesleft']; // VERIFY USER DETAILS $user->user_account($user_email, $user_username); $is_error = $user->is_error; // VERIFY USER PASSWORD (MUST CREATE NEW USER OBJECT SINCE NO OLD PASSWORD IS SPECIFIED) if ($user_password == "") { $password = "******"; } else { $password = $user_password; } $new_user = new se_user(); $new_user->user_password('', $password, $password, 0); if ($is_error == 0) { $is_error = $new_user->is_error; } // CHECK THAT INVITES LEFT IS BETWEEN 0 AND 999 if (!is_numeric($user_invitesleft) || $user_invitesleft > 999) { $is_error = 1142; } // SAVE CHANGES IF NO ERROR if ($is_error == 0) { // SET RESULT $result = 191; // SET SUBNETWORK if ($user_email != $user->user_info[user_email] && ($setting[setting_subnet_field1_id] == 0 || $setting[setting_subnet_field2_id] == 0) || $user_profilecat_id != $user->user_info[user_profilecat_id] && ($setting[setting_subnet_field1_id] == -1 || $setting[setting_subnet_field2_id] == -1)) { $subnet = $user->user_subnet_select($user_email, $user_profilecat_id, $user->profile_info); if ($subnet[0] != $user->user_info[user_subnet_id]) {
$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']; // GET LANGUAGE PACK SELECTION $signup_lang = $setting['setting_lang_allow'] ? $_POST['signup_lang'] : 0; // TEMPORARILY SET PASSWORD IF RANDOM PASSWORD ENABLED if ($setting['setting_signup_randpass'] != 0) { $signup_password = "******"; $signup_password2 = "temporary"; } // CHECK USER ERRORS $new_user->user_password('', $signup_password, $signup_password2, 0); $new_user->user_account($signup_email, $signup_username); $is_error = $new_user->is_error; // CHECK INVITE CODE IF NECESSARY if ($setting['setting_signup_invite'] != 0) { if ($setting['setting_signup_invite_checkemail'] != 0) { $invite = $database->database_query("SELECT invite_id FROM se_invites WHERE invite_code='{$signup_invite}' AND invite_email='{$signup_email}'"); $invite_error_message = 705; } else { $invite = $database->database_query("SELECT invite_id FROM se_invites WHERE invite_code='{$signup_invite}'"); $invite_error_message = 706; } if ($database->database_num_rows($invite) == 0) { $is_error = $invite_error_message; } }