I want to automate some things
-
Hey, I want to automate a process on my website, I want to assign a specific role to the usesr when ever a user is verified. But I am not able to find the hook that is resposible for this.
add_action(‘VERIFICATION HOOK NEEDED‘, ‘assign_verified_user_role’, 10, 1);
function assign_verified_user_role($user_id) { $user = new WP_User($user_id);
if (!$user->has_role(‘verified_user’)) { // Check if user doesn’t already have the verified_user role $user->set_role(‘verified_user’); // Assign the verified_user role } }I tried bp_verified_member_verified_badge with this hook but it doesnt works
If you could please help me with this it would be really great
Thanks!
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.