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, "@" ...


1

In multisite installation there already is a default admin and super-admin role, and if standard capabilities are different than what you want you can modify them: A default set of capabilities is pre-assigned to each role, but other capabilites can be assigned or removed using the add_cap() and remove_cap() functions. New roles can be introduced or ...



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