Multiple Email Addresses, One User

You can use update_user_meta() and add_user_meta(), just store all the email addresses in an array in a new field. If you have a requirement, such as preventing duplicates, run a validation function that checks for that before updating the database.

users and usermeta table

install a fresh wordpress setup on your local machine and then have a look at wp_usersmeta table . It contains meta(additional) information for each user.You (admin) can also make data entry specific to any user by this function update_user_meta() in usermeta table. and retrive the same using get_user_meta() funciton. All fields for all users are … Read more

How to list users by custom field?

To fetch users with certain meta field, you can use WP_User_Query class. Check codex manual for it. So you can create a custom shortcode like this: add_shortcode( ‘listusers’, ‘wpse8170_listusers’ ); function wpse8170_listusers( $atts, $content=”” ) { $atts = shortcode_atts( array( ‘company’ => false ), $atts ); if ( empty( $atts[‘company’] ) ) return $content; $query … Read more

Cannot update user display_name field

This is because there is no meta key named display_name, so if you want to update a single meta value better use update_user_meta instead of wp_update_user, as update_user_meta() will create the meta field if it doesn’t exist. like if ( !empty( $_POST[‘display_name’] ) ) { update_user_meta( $current_user->ID, ‘display_name’, esc_attr( $_POST[‘display_name’] ) ); } Then you … Read more

Lock user information once fields have been filled in

I think this can handle, what you want: Here is the filter documentation http://www.advancedcustomfields.com/resources/filters/acf_update_value/ You can choose whatever filter option you want, but if you use onw of the first two add_filter(‘acf/update_value’, ‘mr_acf_prevent_update’, 10, 3); add_filter(‘acf/update_value/type=text’, ‘mr_acf_prevent_update’, 10, 3); You’ll have to write more conditionals on the callback function. If you use one of these … Read more