Exemple #1
0
         $valid = false;
     }
 }
 if ($valid) {
     $user_data = array('IPADDRESS' => get_ip_address(), 'REFERER' => session::get_http_referer(), 'LOGON' => $logon, 'NICKNAME' => $nickname, 'EMAIL' => $email);
     if (ban_check($user_data)) {
         $error_msg_array[] = gettext("The username or password you supplied is not valid.");
         $valid = false;
     }
 }
 if ($valid) {
     if ($new_uid = user_create($logon, $password, $nickname, $email)) {
         // Save the new user preferences
         user_update_prefs($new_uid, $new_user_prefs);
         // Save the new user signature
         user_update_sig($new_uid, $sig_content, $sig_html);
         // Initialise the new user session.
         session::refresh($new_uid);
         // Check to see if the user is going somewhere after they have registered.
         $final_uri = isset($final_uri) ? rawurlencode($final_uri) : '';
         // If User Confirmation is enabled send the forum owners an email.
         if (forum_get_setting('require_user_approval', 'Y')) {
             admin_send_user_approval_notification();
         }
         // If New User Notification is enabled send the forum owners an email.
         if (forum_get_setting('send_new_user_email', 'Y')) {
             admin_send_new_user_notification($new_uid);
         }
         // Display final success / confirmation page.
         if (forum_get_setting('require_email_confirmation', 'Y')) {
             if (email_send_user_confirmation($new_uid)) {
Exemple #2
0
         $valid = false;
     }
 }
 if ($valid) {
     $user_data = array('IPADDRESS' => get_ip_address(), 'REFERER' => session::get_http_referer(), 'LOGON' => $logon, 'NICKNAME' => $nickname, 'EMAIL' => $email);
     if (ban_check($user_data)) {
         $error_msg_array[] = gettext("The username or password you supplied is not valid.");
         $valid = false;
     }
 }
 if ($valid) {
     if (($new_uid = user_create($logon, $password, $nickname, $email)) !== false) {
         // Save the new user preferences
         user_update_prefs($new_uid, $new_user_prefs);
         // Save the new user signature
         user_update_sig($new_uid, $sig_content, true);
         // Initialise the new user session.
         session::start($new_uid);
         // Update User's last forum visit
         forum_update_last_visit($new_uid);
         // Update the visitor log
         session::update_visitor_log($new_uid, true);
         // Check to see if the user is going somewhere after they have registered.
         $final_uri = isset($final_uri) ? rawurlencode($final_uri) : '';
         // If User Confirmation is enabled send the forum owners an email.
         if (forum_get_setting('require_user_approval', 'Y')) {
             admin_send_user_approval_notification($new_uid);
         }
         // If New User Notification is enabled send the forum owners an email.
         if (forum_get_setting('send_new_user_email', 'Y')) {
             admin_send_new_user_notification($new_uid);
    } else {
        $t_sig_global = 'N';
    }
    if (session::check_perm(USER_PERM_ADMIN_TOOLS, 0) && $admin_edit === true) {
        $t_sig_global = 'N';
    }
    if (attachments_embed_check($sig_text)) {
        $error_msg_array[] = gettext("You are not allowed to embed attachments in your signature.");
        $valid = false;
    }
}
$sig_text = fix_html(emoticons_strip($sig_text));
if (isset($_POST['save'])) {
    if ($valid) {
        // Update USER_SIG
        if (user_update_sig($sig_uid, $sig_text, $t_sig_global == 'Y')) {
            if ($admin_edit === true) {
                $redirect_uri = "admin_user.php?webtag={$webtag}&signature_updated=true&uid={$sig_uid}";
                header_redirect($redirect_uri);
            } else {
                if ($t_sig_global == 'Y' && forums_get_available_count() > 1) {
                    header_redirect("edit_signature.php?webtag={$webtag}&updated_global=true");
                } else {
                    header_redirect($redirect_uri = "edit_signature.php?webtag={$webtag}&updated=true");
                }
            }
        }
    }
}
// Start Output Here
if ($admin_edit === true) {