Replies
- Brajesh Singh on June 24, 2021 at 11:26 pm in reply to: [Resolved] Add roles to users on new registration and first login #39269
Hi Tosin,
the code is working perfectly from me. I tried the following code(create a copy of Subscriber role and named volunteer)
You ca see the role in Dashboard->Members-> 2nd column of the list/** * Change user role on first login */ function buddydev_change_user_role_on_first_login( $user_login, $user ) { if ( ! function_exists( 'buddypress' ) || user_can( $user->ID, 'manage_options' ) ) { return; } // check for user's last activity. $last_activity = bp_get_user_last_activity( $user->ID ); if ( empty( $last_activity ) ) { $role = 'volunteer'; // please change with your desired role. $user->set_role( $role ); } } add_action( 'wp_login', 'buddydev_change_user_role_on_first_login', - 1, 2 );I tried following use case.
1. Registered a user via Dahsboard->User->New and logged, it changed correctly.
2. Registered from front end using Auto Login and Auto Activation plugin, worked.
3. Disabled Auto Activation plugin, registered a new account, activated using the key and logged, it worked too.For me, all the use cases are working. Please check the plugins or code that you might be using. They can have some effect on it.
Regards
Brajesh - Brajesh Singh on June 24, 2021 at 11:06 pm in reply to: [BuddyPress User Profile Tabs Creator Pro] Incompatibility with Memberium #39268This reply has been marked as private.
- Brajesh Singh on June 24, 2021 at 11:01 pm in reply to: Status update doesn’t appear in sitewide activity #39266
Hi Hugo,
Thank you for posting.The Facebook Like Activity does not remove any activity type. It simply merges the streams at one place.
I am unable to guess any reason for it.
Also, by status update, you mean you are using some specific plugin for that?
Thank you
Brajesh - Brajesh Singh on June 24, 2021 at 10:59 pm in reply to: [BuddyPress User Profile Tabs Creator Pro] Incompatibility with Memberium #39265This reply has been marked as private.
- This reply has been marked as private.
- This reply has been marked as private.
- Brajesh Singh on June 24, 2021 at 10:46 pm in reply to: [BuddyPress User Profile Tabs Creator Pro] Incompatibility with Memberium #39261This reply has been marked as private.
- Brajesh Singh on June 24, 2021 at 6:06 pm in reply to: [Resolved] Hide report button on main groups listing page #39253
Hi Nifty,
Thank you for confirming.Regards
Brajesh - This reply has been marked as private.
- Brajesh Singh on June 24, 2021 at 6:00 pm in reply to: [Resolved] How a user can unblock a blocked user #39251This reply has been marked as private.