Support » Localhost Installs » [Resolved] WordPress 3.3, update_user_meta and wp_users/wp_usermeta issue

[Resolved] WordPress 3.3, update_user_meta and wp_users/wp_usermeta issue

  • Hi everybody. Tried to find this in forums, but no luck.

    In WP 3.3, I have noticed an issue: in the profile page, I write the website in the url field. When I press Update it should update the data in the database and to show the new value in the field. It doesn’t show up. From the back end, I tried also to modify the url, and it works. It shows also in the front end when the value is inserted from back end.

    Did some investigation, looks like when inserting from back end, the url goes in wp_users, meta_key is user_url. When inserting from front end, it goes in wp_usermeta, meta_key is user_url. Have no clue why..

    How is this possible, using the native WP functions ( update_user_meta() )? Also, into consideration, in WP 3.2, the same code works fine, and both, front end and back end changes are made in wp_usermeta.

    Any help, ideas, opinions are highly appreciated. Thank you.

Viewing 13 replies - 1 through 13 (of 13 total)
  • I have noticed the same. did you find a workaround?

    Hi. Not yet. Thought maybe something wrong in the code. But can’t find anything wrong. Do you use get_user_meta() to show the user fields?

    Not showing just yet. trying to figure out why it’s not inserting properly.

    The front end uses update_user_meta() to update the field. If I use the_author_meta to retrieve the user_url, it shows me the value inserted from back end. If I use get_user_meta() for the usr_url, it shows me the value inserted from front end.

    figured it out for me.

    I was using update_user_meta on the front end. You have to use

    wp_update_user( array ('ID' => $user_id, 'user_url' => 'http://www.site.com' ) ) ;

    and to get the value in 3.3

    global $current_user;
    echo ( $current_user->__get( ‘user_url’ ) );

    I’m having trouble with this, too. Is it definitely a problem with WP 3.3? I couldn’t find a ticket for it in trac.

    same problem here, any one got a great solution for this?

    yes code monkey use wp_update_user to add the user_url.

    Thank you, lerizzle. It really works. This is for WP 3.3 only?

    hi! everyone. when you use wp_update_user function, did you meet this error (Warning: Cannot modify header information – headers already sent by (output started at C:themes\twentyten\header.php:14) in C:\wp-includes\pluggable.php on line 720)? I’m new using wordpress. Please help me.

    How can i rid this?

    thanks in advance

    Hi @ace90 there are lot possible solution in your problem and we didn’t know which file you’ve updated or edited but this is just a case.

    Check your wp-config.php, just make sure there are no space at the beginning “<?php” and end of the file “?>”, no quote.

    or check your index.php and header.php.

    hope that helps,

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] WordPress 3.3, update_user_meta and wp_users/wp_usermeta issue’ is closed to new replies.