user_nicename fixes from JackSim. http://wordpress.org/support/4/6708
git-svn-id: http://svn.automattic.com/wordpress/trunk@1380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
53dade6946
commit
904c577e98
|
@ -86,6 +86,7 @@ case 'update':
|
|||
$newuser_firstname=addslashes(stripslashes($_POST['newuser_firstname']));
|
||||
$newuser_lastname=addslashes(stripslashes($_POST['newuser_lastname']));
|
||||
$newuser_nickname=addslashes(stripslashes($_POST['newuser_nickname']));
|
||||
$newuser_nicename=sanitize_title($newuser_nickname);
|
||||
$newuser_icq=addslashes(stripslashes($_POST['newuser_icq']));
|
||||
$newuser_aim=addslashes(stripslashes($_POST['newuser_aim']));
|
||||
$newuser_msn=addslashes(stripslashes($_POST['newuser_msn']));
|
||||
|
@ -95,7 +96,7 @@ case 'update':
|
|||
$newuser_idmode=addslashes(stripslashes($_POST['newuser_idmode']));
|
||||
$user_description = addslashes(stripslashes($_POST['user_description']));
|
||||
|
||||
$query = "UPDATE $wpdb->users SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description' WHERE ID = $user_ID";
|
||||
$query = "UPDATE $wpdb->users SET user_firstname='$newuser_firstname', $updatepassword user_lastname='$newuser_lastname', user_nickname='$newuser_nickname', user_icq='$newuser_icq', user_email='$newuser_email', user_url='$newuser_url', user_aim='$newuser_aim', user_msn='$newuser_msn', user_yim='$newuser_yim', user_idmode='$newuser_idmode', user_description = '$user_description', user_nicename = '$newuser_nicename' WHERE ID = $user_ID";
|
||||
$result = $wpdb->query($query);
|
||||
if (!$result) {
|
||||
die (__("<strong>ERROR</strong>: couldn't update your profile..."));
|
||||
|
|
|
@ -83,13 +83,14 @@ case 'register':
|
|||
$user_login = $wpdb->escape($user_login);
|
||||
$pass1 = $wpdb->escape($pass1);
|
||||
$user_nickname = $wpdb->escape($user_nickname);
|
||||
$user_nicename = sanitize_title($user_nickname);
|
||||
$now = gmdate('Y-m-d H:i:s');
|
||||
$new_users_can_blog = get_settings('new_users_can_blog');
|
||||
|
||||
$result = $wpdb->query("INSERT INTO $wpdb->users
|
||||
(user_login, user_pass, user_nickname, user_email, user_ip, user_browser, dateYMDhour, user_level, user_idmode)
|
||||
(user_login, user_pass, user_nickname, user_email, user_ip, user_browser, dateYMDhour, user_level, user_idmode, user_nicename)
|
||||
VALUES
|
||||
('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_browser', '$now', '$new_users_can_blog', 'nickname')");
|
||||
('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_browser', '$now', '$new_users_can_blog', 'nickname', '$user_nicename')");
|
||||
|
||||
if ($result == false) {
|
||||
die (sprintf(__('<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !'), get_settings('admin_email')));
|
||||
|
|
Loading…
Reference in New Issue