Auto approve new users userpro
To auto-approve new users in UserPro, you can follow these steps:
Method 1: Using UserPro's built-in feature
- Log in to your WordPress dashboard and navigate to UserPro > Settings.
- Scroll down to the Registration section.
- Under New User Registration, select Auto-approve new users from the dropdown menu.
- Click Save Changes.
Method 2: Using a plugin
- Install and activate the User Role Editor plugin.
- Go to User Role Editor > User Roles.
- Click on the Edit link next to the Subscriber role (or the role you want to auto-approve).
- Scroll down to the Capabilities section.
- Under Capabilities, find the edit_posts capability and click on the Edit link next to it.
- In the Edit Capability page, select Allow for the edit_posts capability.
- Click Save Changes.
Method 3: Using a code snippet
- Add the following code snippet to your theme's functions.php file:
function auto_approve_new_users($user_id) { $user = new WP_User($user_id); $user->set_role('subscriber'); } add_action('wp_new_user', 'auto_approve_new_users');
This code will automatically set the new user's role to Subscriber (or any other role you specify) when they register.
Note: Make sure to replace 'subscriber'
with the actual role you want to auto-approve.
After implementing one of these methods, new users will be automatically approved and will have the specified role assigned to them.