User defined password at registration – registration email sends auto generated pass

Welcome to WPSE. You can use wp_insert_user, you don’t need to hook onto anything. Assuming here they fill out a form with a name, username, email and password field, and you capture it however you want. $name_array = explode(‘ ‘,$_POST[‘name’]); $user = array( ‘user_login’ => $_POST[‘username’], ‘user_pass’ => $_POST[‘password’], ‘user_email’ => $_POST[’email’], ‘first_name’ => $name_array[0], … Read more

Add profile field (usermeta) to Add New User

To add data to the form at user-new-php, I believe you want the user_new_form hook. Unfortunately, it is marked “@since 3.7.0” so it isn’t in the stable release yet. I am tempted to tell you to hack it into your site in exactly the place that it will soon appear, but that would be wrong. … Read more

How to update serialized data in the user meta data

Thats just PHP serialized array notation. You would get that same result by this code: $meta_value = array( ‘alumni’ => ‘Yes’, ‘donations_collected’ => ’10’ ); update_user_meta( $team_member_id, ‘wp_s2member_custom_fields’, $meta_value); So if you want to then change the donations_collected value to 11: $meta_value = get_user_meta( $team_member_id, ‘wp_s2member_custom_fields’, true ); $meta_value[‘donations_collected’]++; update_user_meta( $team_member_id, ‘wp_s2member_custom_fields’, $meta_value);

Authors details such as social media links, emails etc → Is this Meta or something else?

Add user contact methods using the user_contactmethods filter in your theme’s functions.php or via a plugin: User contact method entries are stored in the wp_usermeta table. The URL field is special; it’s stored in the user_url field in the wp_users table. // Add user contact methods add_filter( ‘user_contactmethods’,’wpse_user_contactmethods’, 10, 1 ); function wpse_user_contactmethods( $contact_methods ) … Read more

How to display some selected user meta data on a specific page with a shortcode?

Here is the simplest shortcode that will do the job for you add_shortcode(‘USER_META’, ‘user_meta_shortcode_handler’); /** * User Meta Shortcode handler * usage: [USER_META user_id=1 meta=”first_name”] * @param array $atts * @param string $content * @return stirng */ function user_meta_shortcode_handler($atts,$content=null){ return esc_html(get_user_meta($atts[‘user_id’], $atts[‘meta’], true)); } USAGE: [USER_META user_id=1 meta=”first_name”] [USER_META user_id=1 meta=”last_name”]

Front end user meta options for users

“edit_user_profile_update” is not an action… check: http://codex.wordpress.org/Plugin_API/Action_Reference update_usermeta() is deprecated in wp 3 and above, use update_user_meta() your form is lacking some standard hidden fields like: <input type=”hidden” name=”user_id” id=”user_id” value=”<?php echo esc_attr( $current_user->ID ); ?>” /> use wp_nonce_field(); ex: <?php wp_nonce_field( ‘update-user_’ . $current_user->ID ) ?>

Showing user ID on user main page from screen options

You need to use the filter ‘manage_’ . $screen->id . ‘_columns’ to add a column and manage_users_custom_column to display its value. add_filter( ‘manage_users_columns’, ‘column_register_wpse_101322’ ); add_filter( ‘manage_users_custom_column’, ‘column_display_wpse_101322’, 10, 3 ); function column_register_wpse_101322( $columns ) { $columns[‘uid’] = ‘ID’; return $columns; } function column_display_wpse_101322( $empty, $column_name, $user_id ) { if ( ‘uid’ != $column_name ) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)