mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Better names and typo.
git-svn-id: http://svn.automattic.com/wordpress/trunk@2844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9745f25a57
commit
101ac654d1
@ -1,76 +1,64 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
require_once('admin.php');
|
require_once('admin.php');
|
||||||
|
|
||||||
check_admin_referer();
|
check_admin_referer();
|
||||||
|
|
||||||
/* if the ICQ UIN has been entered, check to see if it has only numbers */
|
if ( empty($_POST['email']) )
|
||||||
if (!empty($_POST["newuser_icq"])) {
|
die (__("<strong>ERROR</strong>: please type your e-mail address"));
|
||||||
if ((ereg("^[0-9]+$",$_POST["newuser_icq"]))==false) {
|
elseif ( !is_email($_POST['email']) )
|
||||||
die (__("<strong>ERROR</strong>: your ICQ UIN can only be a number, no letters allowed"));
|
die (__("<strong>ERROR</strong>: the e-mail address isn't correct"));
|
||||||
return false;
|
|
||||||
}
|
$pass1 = $_POST['pass1'];
|
||||||
}
|
$pass2 = $_POST['pass2'];
|
||||||
|
do_action('check_passwords', array($user_login, &$pass1, &$pass2));
|
||||||
/* checking e-mail address */
|
|
||||||
if (empty($_POST["newuser_email"])) {
|
if ( '' == $pass1 ) {
|
||||||
die (__("<strong>ERROR</strong>: please type your e-mail address"));
|
if ( '' != $pass2 )
|
||||||
return false;
|
die (__('<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.'));
|
||||||
} else if (!is_email($_POST["newuser_email"])) {
|
$updatepassword = '';
|
||||||
die (__("<strong>ERROR</strong>: the e-mail address isn't correct"));
|
} else {
|
||||||
return false;
|
if ('' == $pass2)
|
||||||
}
|
die (__('<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.'));
|
||||||
|
if ( $pass1 != $pass2 )
|
||||||
$pass1 = $_POST['pass1'];
|
die (__('<strong>ERROR</strong>: you typed two different passwords. Go back to correct that.'));
|
||||||
$pass2 = $_POST['pass2'];
|
$newuser_pass = $pass1;
|
||||||
do_action('check_passwords', array($user_login, &$pass1, &$pass2));
|
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
|
||||||
|
wp_clearcookie();
|
||||||
if ( '' == $pass1 ) {
|
wp_setcookie($user_login, $newuser_pass);
|
||||||
if ( '' != $pass2 )
|
}
|
||||||
die (__('<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.'));
|
|
||||||
$updatepassword = '';
|
$first_name = wp_specialchars($_POST['first_name']);
|
||||||
} else {
|
$last_name = wp_specialchars($_POST['last_name']);
|
||||||
if ('' == $pass2)
|
$display_name = wp_specialchars($_POST['display_name']);
|
||||||
die (__('<strong>ERROR</strong>: you typed your new password only once. Go back to type it twice.'));
|
$nickname = $_POST['nickname'];
|
||||||
if ( $pass1 != $pass2 )
|
$nicename = sanitize_title($nickname);
|
||||||
die (__('<strong>ERROR</strong>: you typed two different passwords. Go back to correct that.'));
|
$jabber = wp_specialchars($_POST['jabber']);
|
||||||
$newuser_pass = $pass1;
|
$aim = wp_specialchars($_POST['aim']);
|
||||||
$updatepassword = "user_pass=MD5('$newuser_pass'), ";
|
$yim = wp_specialchars($_POST['yim']);
|
||||||
wp_clearcookie();
|
$email = wp_specialchars($_POST['email']);
|
||||||
wp_setcookie($user_login, $newuser_pass);
|
$url = wp_specialchars($_POST['url']);
|
||||||
}
|
$url = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $newuser_url) ? $newuser_url : 'http://' . $newuser_url;
|
||||||
|
$user_description = $_POST['user_description'];
|
||||||
$newuser_firstname = wp_specialchars($_POST['newuser_firstname']);
|
|
||||||
$newuser_lastname = wp_specialchars($_POST['newuser_lastname']);
|
$result = $wpdb->query("UPDATE $wpdb->users SET $updatepassword user_email='$email', user_url='$url', user_nicename = '$nicename', display_name = '$display_name' WHERE ID = '$user_ID'");
|
||||||
$new_display_name = wp_specialchars($_POST['display_name']);
|
|
||||||
$newuser_nickname = $_POST['newuser_nickname'];
|
update_usermeta( $user_ID, 'first_name', $first_name );
|
||||||
$newuser_nicename = sanitize_title($newuser_nickname);
|
update_usermeta( $user_ID, 'last_name', $last_name );
|
||||||
$jabber = wp_specialchars($_POST['jabber']);
|
update_usermeta( $user_ID, 'nickname', $nickname );
|
||||||
$newuser_aim = wp_specialchars($_POST['newuser_aim']);
|
update_usermeta( $user_ID, 'description', $user_description );
|
||||||
$newuser_yim = wp_specialchars($_POST['newuser_yim']);
|
update_usermeta( $user_ID, 'jabber', $jabber );
|
||||||
$newuser_email = wp_specialchars($_POST['newuser_email']);
|
update_usermeta( $user_ID, 'aim', $aim );
|
||||||
$newuser_url = wp_specialchars($_POST['newuser_url']);
|
update_usermeta( $user_ID, 'yim', $yim );
|
||||||
$newuser_url = preg_match('/^(https?|ftps?|mailto|news|gopher):/is', $newuser_url) ? $newuser_url : 'http://' . $newuser_url;
|
|
||||||
$user_description = $_POST['user_description'];
|
do_action('profile_update', $user_ID);
|
||||||
|
|
||||||
$result = $wpdb->query("UPDATE $wpdb->users SET $updatepassword user_email='$newuser_email', user_url='$newuser_url', user_nicename = '$newuser_nicename', display_name = '$new_display_name' WHERE ID = $user_ID");
|
if ( 'profile' == $_POST['from'] )
|
||||||
|
$to = 'profile.php?updated=true';
|
||||||
update_usermeta( $user_ID, 'first_name', $newuser_firstname );
|
else
|
||||||
update_usermeta( $user_ID, 'last_name', $newuser_lastname );
|
$to = 'profile.php?updated=true';
|
||||||
update_usermeta( $user_ID, 'nickname', $newuser_nickname );
|
|
||||||
update_usermeta( $user_ID, 'description', $user_description );
|
wp_redirect( $to );
|
||||||
update_usermeta( $user_ID, 'jabber', $jabber );
|
exit;
|
||||||
update_usermeta( $user_ID, 'aim', $newuser_aim );
|
|
||||||
update_usermeta( $user_ID, 'yim', $newuser_yim );
|
|
||||||
|
|
||||||
do_action('profile_update', $user_ID);
|
|
||||||
|
|
||||||
if ( 'profile' == $_POST['from'] )
|
|
||||||
$to = 'profile.php?updated=true';
|
|
||||||
else
|
|
||||||
$to = 'profile.php?updated=true';
|
|
||||||
|
|
||||||
wp_redirect( $to );
|
|
||||||
exit;
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -31,13 +31,13 @@ $bookmarklet_height= 440;
|
|||||||
<input type="text" name="username" value="<?php echo $profiledata->user_login; ?>" disabled="disabled" />
|
<input type="text" name="username" value="<?php echo $profiledata->user_login; ?>" disabled="disabled" />
|
||||||
</label></p>
|
</label></p>
|
||||||
<p><label><?php _e('First name:') ?><br />
|
<p><label><?php _e('First name:') ?><br />
|
||||||
<input type="text" name="newuser_firstname" id="newuser_firstname" value="<?php echo $profiledata->first_name ?>" /></label></p>
|
<input type="text" name="first_name" value="<?php echo $profiledata->first_name ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Last name:') ?><br />
|
<p><label><?php _e('Last name:') ?><br />
|
||||||
<input type="text" name="newuser_lastname" id="newuser_lastname2" value="<?php echo $profiledata->last_name ?>" /></label></p>
|
<input type="text" name="last_name" value="<?php echo $profiledata->last_name ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Nickname:') ?><br />
|
<p><label><?php _e('Nickname:') ?><br />
|
||||||
<input type="text" name="newuser_nickname" id="newuser_nickname2" value="<?php echo $profiledata->nickname ?>" /></label></p>
|
<input type="text" name="nickname" value="<?php echo $profiledata->nickname ?>" /></label></p>
|
||||||
|
|
||||||
</p><label><?php _e('Display name publicly as:') ?> <br />
|
</p><label><?php _e('Display name publicly as:') ?> <br />
|
||||||
<select name="display_name">
|
<select name="display_name">
|
||||||
@ -61,22 +61,22 @@ $bookmarklet_height= 440;
|
|||||||
<legend><?php _e('Contact Info'); ?></legend>
|
<legend><?php _e('Contact Info'); ?></legend>
|
||||||
|
|
||||||
<p><label><?php _e('E-mail: (required)') ?><br />
|
<p><label><?php _e('E-mail: (required)') ?><br />
|
||||||
<input type="text" name="newuser_email" id="newuser_email2" value="<?php echo $profiledata->user_email ?>" /></label></p>
|
<input type="text" name="email" value="<?php echo $profiledata->user_email ?>" /></label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Website:') ?><br />
|
<p><label><?php _e('Website:') ?><br />
|
||||||
<input type="text" name="newuser_url" id="newuser_url2" value="<?php echo $profiledata->user_url ?>" />
|
<input type="text" name="url" value="<?php echo $profiledata->user_url ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('AIM:') ?><br />
|
<p><label><?php _e('AIM:') ?><br />
|
||||||
<input type="text" name="newuser_aim" id="newuser_aim2" value="<?php echo $profiledata->aim ?>" />
|
<input type="text" name="aim" value="<?php echo $profiledata->aim ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Yahoo IM:') ?><br />
|
<p><label><?php _e('Yahoo IM:') ?><br />
|
||||||
<input type="text" name="newuser_yim" id="newuser_yim2" value="<?php echo $profiledata->yim ?>" />
|
<input type="text" name="yim" value="<?php echo $profiledata->yim ?>" />
|
||||||
</label></p>
|
</label></p>
|
||||||
|
|
||||||
<p><label><?php _e('Jabber / Google Talk:') ?>
|
<p><label><?php _e('Jabber / Google Talk:') ?>
|
||||||
<input type="text" name="jabber" id="jabber" value="<?php echo $profiledata->jabber ?>" /></label>
|
<input type="text" name="jabber" value="<?php echo $profiledata->jabber ?>" /></label>
|
||||||
</p>
|
</p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<br clear="all" />
|
<br clear="all" />
|
||||||
|
@ -681,7 +681,7 @@ table .vers, table .name {
|
|||||||
margin: 1em;
|
margin: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
#your-profile fieldset input, {
|
#your-profile fieldset input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
|
Loading…
Reference in New Issue
Block a user