Articles of user meta

Create reviews and star-rating for user accounts in wp-admin

I would like each and every user to have the rating in stars and a review along with it so that any user can rate them using JavaScript 5 stars. The various reviews along with stars rating should be displayed in the wp-admin panel so that the user can analyze himself. And a cumulative average […]

Update user meta without lose of old data

Is this is possible to update the user meta without lose the old data it have ? For example : i have the following data in my user meta field name user_documents a:4:{i:0;s:36:”817fb3ec8e2412b141bcc40c1e16d4c9.jpg”;i:1;i:91;i:2;s:27:”8769106-alone-wallpaper.jpg”;i:3;i:92;} this is about the attached files with the user_documents meta, if suppose a user upload more files i want to store it […]

Create new user from phpMyAdmin

I’m trying to copy site that I have created in free web hosting server to my windows pc that runs WP on WAMP. I copied all files, but took wp-config.php from sample site I run on my PC and have done few modification with db connection in it. Copied site somehow runs on my PC, […]

update_user_meta adding new rows in db for same key

I have added new user meta for a given user. Let’s call it title. Every time I run $user = get_user_by(‘login’,$username); update_user_meta($user->ID, ‘title’,’Manager’); The meta is not updated. Instead, a new row gets added to the wp_usermeta table for this user -> meta_key -> meta_value with a new umeta_id. Also, the meta is not available […]

wp_usermeta – Read from database, but save function broken

I added a custom field to the profile-page of WordPress users called “uidnumber” and it reads values from the database just fine, however it just doesn’t save anything. I’d rather save it in wp_users instead if I could because the whole table is just that much more clear, however from what I’ve read, WordPress updates […]

Edit Account – read and write to MySQL

I have user data that’s being saved to and read from the database as they are all standard WordPress fields. example: $user->user_email And here’s the code I have inside the form-edit-account.php: <p class=”form-row form-row-wide”> <label for=”account_uid”><?php _e( ‘UID-Nummer’, ‘woocommerce’ ); ?></label> <input type=”text” class=”input-text” name=”uidnumber” id=”uidnumber” value=”<?php echo esc_attr( $user->user_uidnumber ); ?>” /> </p> Here’s […]

Updating user meta

I’m struggling to figure out to get the code to update a single current user meta. For instance if I want to update their first name automatically. I’m using $current_user = wp_get_current_user(); to call the current user data rather than specifying a particular user ID.

Show number of posts by logged in user

How to display the number of posts written by the logged in user. Here is what i got from the codex so far <?php echo ‘Number of posts published by user: ‘ . count_user_posts( 5 ); ?>

How to get its meta_value of a specific meta_key within wp_usermeta

Using the S2member plugin, a meta_key for the last-payment-time is automatically stored in WordPress DB under table wp_usermeta (custom field is called wp_meds2member_last_payment_time). From wp_usermeta, the column called meta_key has a value ‘wp_meds2member_last_payment_time’. But the content I’m trying to collect is its meta_value equivalent. I didn’t find how to call this meta_value to the function […]

Buddypress avatar image in database

I want to get path of buddy-press profile pic directly in database to be used on other then word-press platform but i am not able to find it in database.. because i can’t use buddy-press functions in other platform or language.i am using only buddypress databse. Please help Thanks