Tag Info

Hot answers tagged

2

With this code, you will check during the registration the users email and attach the roles you want to: <?php add_action( 'user_register', 'wp234_set_role_by_email' ); function wp234_set_role_by_email( $user_id ){ $user = get_user_by( 'id', $user_id ); $domain = substr( strrchr( $user->data->user_email, "@" ...



Only top voted, non community-wiki answers of a minimum length are eligible