[wp-hackers] User Details don't update until second refresh of page?

Robert Lusby nanogwp at gmail.com
Tue Jun 14 13:58:03 UTC 2011

I'm updating user details by way of wp_update_user, a form submitted on 
POST and a hook on "init".

User submits the form with new details, and they all get updated in the 
database via the hook above and WP function.

However further down the page when this updated user values are called 
(via get_currentuserinfo()) ... it will load with the OLD user data, 
until refreshing the page for a second time.

I thought anything in the theme ran "after" init?

Obviously I'm missing something as the database changes happen, and the 
user details get updated, but "echo $current_user->user_firstname" will 
still output the previous firstname until doing a second refresh.

Any ideas?


More information about the wp-hackers mailing list