ERROR: Please enter a username.')); /* checking the password has been typed twice */ do_action('check_passwords', array($user_login, &$pass1, &$pass2)); if ($pass1 == '' || $pass2 == '') die (__('ERROR: Please enter your password twice.')); /* checking the password has been typed twice the same */ if ($pass1 != $pass2) die (__('ERROR: Please type the same password in the two password fields.')); $user_nickname = $user_login; if ( username_exists( $user_login ) ) die (__('ERROR: This username is already registered, please choose another one.')); /* checking e-mail address */ if (empty($user_email)) { die (__("ERROR: please type an e-mail address")); return false; } else if (!is_email($user_email)) { die (__("ERROR: the email address isn't correct")); return false; } $user_ID = create_user( $user_login, $pass1, $user_email, 0 ); update_usermeta( $user_ID, 'first_name', $user_firstname); update_usermeta( $user_ID, 'last_name', $user_lastname); update_usermeta( $user_ID, 'first_name', $user_firstname); $stars = ''; for ($i = 0; $i < strlen($pass1); $i = $i + 1) $stars .= '*'; $user_login = stripslashes($user_login); $message = sprintf(__('New user registration on your blog %s:'), get_settings('blogname')) . "\r\n\r\n"; $message .= sprintf(__('Username: %s'), $user_login) . "\r\n\r\n"; $message .= sprintf(__('E-mail: %s'), $user_email) . "\r\n"; @wp_mail(get_settings('admin_email'), sprintf(__('[%s] New User Registration'), get_settings('blogname')), $message); header('Location: users.php'); break; case 'promote': check_admin_referer(); if (empty($_GET['prom'])) { header('Location: users.php'); } $id = (int) $_GET['id']; $prom = $_GET['prom']; $user_data = get_userdata($id); $usertopromote_level = $user_data->user_level; if ( $user_level <= $usertopromote_level ) die(__('Can’t change the level of a user whose level is higher than yours.')); if ('up' == $prom) { $new_level = $usertopromote_level + 1; } elseif ('down' == $prom) { $new_level = $usertopromote_level - 1; } update_usermeta( $id, $wpdb->prefix . 'user_level', $new_level); header('Location: users.php'); break; case 'delete': check_admin_referer(); $id = (int) $_GET['id']; if (!$id) { header('Location: users.php'); } $user_data = get_userdata($id); $usertodelete_level = $user_data->user_level; if ($user_level <= $usertodelete_level) die(__('Can’t delete a user whose level is higher than yours.')); wp_delete_user($id); header('Location: users.php?deleted=true'); break; default: include ('admin-header.php'); ?>

user_email; $url = $user_data->user_url; $short_url = str_replace('http://', '', $url); $short_url = str_replace('www.', '', $short_url); if ('/' == substr($short_url, -1)) $short_url = substr($short_url, 0, -1); if (strlen($short_url) > 35) $short_url = substr($short_url, 0, 32).'...'; $style = ('class="alternate"' == $style) ? '' : 'class="alternate"'; $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$user' and post_status = 'publish'"); if (0 < $numposts) $numposts = "$numposts"; echo " "; echo ''; echo ''; } ?>
 
$user_data->ID $user_data->user_login $user_data->first_name $user_data->last_name $email $short_url "; if (($user_level >= 2) and ($user_level > $user_data->user_level) and ($user_data->user_level > 0)) echo " ID."&prom=down\">- "; echo $user_data->user_level; if (($user_level >= 2) and ($user_level > ($user_data->user_level + 1))) echo " ID."&prom=up\">+ "; echo "$numposts'; if (($user_level >= 2) and ($user_level > $user_data->user_level)) echo "".__('Edit').""; echo '

user_email; $url = $user_data->user_url; $short_url = str_replace('http://', '', $url); $short_url = str_replace('www.', '', $short_url); if ('/' == substr($short_url, -1)) $short_url = substr($short_url, 0, -1); if (strlen($short_url) > 35) $short_url = substr($short_url, 0, 32).'...'; $style = ('class="alternate"' == $style) ? '' : 'class="alternate"'; echo "\n\n"; echo ''; } ?>
$user_data->ID $user_data->user_login $user_data->first_name $user_data->last_name $email $short_url "; if ($user_level >= 6) echo "". __('Promote') . ''; echo "'; if (($user_level >= 6) and ($user_level > $user_data->user_level)) echo "".__('Edit').""; echo ''; if ($user_level >= 6) echo "" . __('Delete'). ''; echo '

Users can register themselves or you can manually create users here.

'), get_settings('siteurl')); ?>