BuddyPress | Check if user is in current group [closed]
function is_user_a_member_of_this_group($user_id, $group_id) //return: bool return groups_is_user_member( $user_id, $group_id ); }
function is_user_a_member_of_this_group($user_id, $group_id) //return: bool return groups_is_user_member( $user_id, $group_id ); }
Might be overkill, but you might want to take a look at BuddyPress – it’s an actively developed project that extends WordPress with social networking features.
you can Disable users activation email: https://buddypress.org/support/topic/resolved-disable-users-activation-email/ and there is plugin to do its: https://timersys.com/free-plugins/bp-disable-activation-reloaded/
I haven’t an ready to use solution. However I think you should enhance the query, so that you have the field of the users inside this. I think the follow example demonstrate it more. The two filter hooks are necessary and get an result for the query like this: SELECT SQL_CALC_FOUND_ROWS wpbeta_posts.ID FROM wpbeta_posts JOIN … Read more
WordPress used MD5 for password hash in the past, but had since moved on to more secure phpass. The good thing is that it retains backwards compatibility – if user had old MD5 hash then it will be checked as such and automatically re-hashed and re-saved using current algorithm, see wp_check_password(). You are correct that … Read more
As @t-f pointed out in his comment to question, you have an error on checking current user capability: ‘delete_published_posts’. $post_author_id simply doesn’t exist. After that, for your scope probably is a better hookin the filter wp_insert_post_data instead of the action save_post: because this one run when the post was already saved / updated, so if … Read more
You should be able to do this yourself by writing a simple function and hooking it it onto a user-related action (whether you want to do this once or on an ongoing basis will be up to you). There are a couple different ways to trigger it, but perhaps the simplest I can think of … Read more
I was busy writing up a plugin for this without even checking of one already existed. So I did a little research and found out that it does indeed already exist and that the path I was going down was the right one. Well, there’s no need to reinvent the wheel here, so here’s the … Read more
If you are looking to connect your sites sign-up with Gravatar then you simply can’t, since Gravatar don’t have a sing-up api you can use. But if you are just looking to let your users upload there own photos the either Simple Local Avatars Plugin that Chip suggested or one I’ve used a lot before … Read more
Finally, I’ve figured out a way to do it using WP_user Class. Snippet to add/remove capability to/from specific user – //to remove capability from user $user = new WP_User( $user_id ); $user->remove_cap( ‘can_email’); //to add capability to user $user = new WP_User( $user_id ); $user->add_cap( ‘can_email’); There is special function in capabilities.php in the wp_user … Read more