How it works...
The default role for users is stored in the default_role key in the wp_options table. Subscriber will be the default user role configured in the WordPress core. WordPress allows us to change this user role using the New User Default Role setting in the Settings section.
First, we create a new user role called Basic Member, using the support of the User Role Editor plugin. We already discussed how user role creation works in the Managing user roles and permissions recipe. Once the role is created, we have the ability to select the new role for the New User Default Role setting. We assigned Basic Member as the default role for the site. Now, the users created from backend or frontend registrations will have a Basic Member role ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access