Get user count based on multiple meta key values?
Get user count based on multiple meta key values?
Get user count based on multiple meta key values?
The problem is that you’re using get_current_user_id();. There’s two reasons this is incorrect: The user being created is not necessarily the current user. For example, if an admin creates the user manually. user_register runs immediately after the user is created, but before the user is logged in. So when user_register runs for somebody registering on … Read more
To get the group count, use groups_get_user_groups. Find it in: buddypress\bp-groups\bp-groups-functions.php In the members loop, the member id is provided via: bp_member_user_id() You will need to check the member-loop template to find out how to hook into the loop. Or overload that template in your child theme and add a do_action wherever you want it. … Read more
How to remove the url format from the WEBSITE field in the user registry?
// User Settings Errors add_filter( ‘user_profile_update_errors’, ‘my_plugin_user_settings_errors’ ); function my_plugin_user_settings_errors( $errors ) { $user_level = intval( $_POST[ ‘my-plugin-user-level’ ] ); if ( ! is_int( $user_level ) || $user_level < 0 || $user_level > 50 ) { $errors->add( ‘my-plugin-invalid-admin-level’, ‘<strong>ERROR:</strong> User Level must be between 0 and 50.’ ); } return $errors; }
Not long after posing this question I figured it out. But since I had spent a few hours looking for the awswer I thought maybe it would be worth posting. I hope this does not break any rules. I changed the default priority from 10 to 11. as per: add_action( ‘profile_update’, ‘initiate_participant_profile_update’, 10, 2 ); … Read more
wp_redirect sends a HTTP header to the browser. Once HTTP headers are sent, that’s it, they’re gone, you can’t add anymore. However, you called get_header and rendered some HTML. To do this headers need to be sent to the browser telling it to expect a HTML page. So by the time you load edit-profile-proccess.php, it’s … Read more
Why is my Custom User Meta deleted on Profile Update?
check metadata in wordpress
Delete user meta ( delete_user_meta ) by key without user id