Functions.php
-
Hi,
I’m not able to make this functions.php function work.
All new user registrations are “subscribers”. Inside the site they ask to be a “seller”.When approved as “Seller” it is automatically approved as “Manager“
add_action( ‘user_register’, ‘add_secondary_role’, 10, 1 );
function add_secondary_role( $user_id ) {
$user = get_user_by(‘id’, $user_id);if (userpro()) {
$user_id->userpro = true;
$user->add_role(‘manager’);
}
}Some help?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Functions.php’ is closed to new replies.