ionelberdin
Forum Replies Created
-
Forum: Plugins
In reply to: Verify User Email ChangeHere it goes what I do:
1) When an user sends a request to change the email address I save it as a temporary meta value and send an email just like the one was sent when the user was registered, so they can verify it.
2) Until the user verifies that second email address, the former one keeps being the right one.
3) When the user verifies the new address, the system runs the change and deletes the temporary meta value.I hope this helps you.
Cheers!
Forum: Hacks
In reply to: wpdb update user_login also updates user_nicenameBy the way, I don’t know how you are updating the user_login property (I guess you are using the wp_update_user function), but if you use the $wpdb object it doesn’t happen that ugly change in the user_nicename:
// Call to the wpdb object $wpdb->update( 'wp_users', array( 'user_login' => $new_user_login ), array( 'ID' => $user_ID ) );Forum: Hacks
In reply to: wpdb update user_login also updates user_nicenameHi there!
Why don’t you update the user_nicename right after the user_login change?
You can get it first using:
get_currentuserinfo();
And then save it with:
wp_update_user(array('ID'=>$user_ID,'user_nicename'=>$current_user->data->user_nicename));In more steps:
// Get current user info get_currentuserinfo(); // Initialize the object: $current_user // Do the change in the user_login . . . // Restart the user_nicename $userdata = array( 'ID' => $user_ID, 'user_nicename' => $current_user->data->user_nicename ); wp_update_user($userdata);I hope this works for you.
This doesn’t prevent wordpress from working funny, but it solves your problem.