=== User Approval Manager ===
Contributors: srallios
Donate link: https://www.rallios.gr/
Tags: user approval, user registration, admin approval, security, login control
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 1.2.2
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Requires admin approval for new users to log in. Admins can selectively auto-approve specific user roles while others require manual review.

== Description ==

**User Approval Manager** adds an approval layer to WordPress user registration.

When a new user registers, the plugin prevents immediate login and notifies the site administrator(s) by email. The administrator can approve or reject the user directly via action buttons included in the email.

At the same time, the user receives an automatic email informing them that their account is pending approval. Once approved, the user is notified and can log in normally.

This plugin is ideal for:
- Membership websites
- B2B platforms
- Private communities
- WooCommerce stores requiring verified customers

**Plugin Homepage:** [User Approval Manager](https://www.rallios.gr/portfolio/user-approval-manager/)

**Author:** [Rallios Sotiris](https://www.rallios.gr/)


== Features ==

* Blocks login for newly registered users until approved
* **Custom approval capability** — assign the `uam_manage_approvals` capability to selected dashboard roles so they can approve or reject users
* **Enhanced General Settings layout** — structured sections for approval roles and notification settings, plus a dedicated Auto-Approval Settings tab
* **Role-based notification routing** — send approval emails to users in selected notification roles plus additional custom email addresses
* **Email tags UI** — add comma-separated or Enter-separated notification emails with pill-style chips and validation
* Approve or reject users directly from email buttons or the Users screen
* **Reset password button** — use the {reset_password_button} placeholder in the User Approval Email to send new users a one-click “Set Password” link (respects custom login URLs and wp_lang)
* **Role-based auto-approval** — choose one or more WordPress user roles to auto-approve on registration (for example, auto-approve `customer` while requiring manual approval for `wholesale_customer`)
* Sends automatic status emails to users (pending / approved)
* Simple configuration via WordPress admin
* Lightweight and focused — no unnecessary complexity

== Frequently Asked Questions ==

= Can users log in before approval? =
No. Until an administrator approves the account, login is completely blocked.

= Who can approve pending users? =
Site owners configure this under Approval Admin Roles in General Settings. Selected dashboard roles receive the `uam_manage_approvals` capability.

= Who receives approval notification emails? =
All active users in the selected Notification Roles, plus any addresses added in Additional Notification Emails.

= Does this work with WooCommerce registration? =
Yes. It works with standard WordPress and WooCommerce user registrations, including checkout account creation.

= Can I auto-approve only certain user roles? =
Yes. Open the Auto-Approval Settings tab and select the roles you want to auto-approve. Users with any selected role are approved automatically; all other roles follow the manual approval workflow.

= What happens if no roles are selected for auto-approval? =
All new registrations require manual administrator approval.

= Can I customize the email content? =
Yes. Email messages can be edited to match your site’s tone and language.

== Screenshots ==

1. Plugin settings page – administrator email configuration
2. Auto-Approval Settings
3. User pending approval notification email
4. Approval email with approve / reject buttons
5. User approval notification email

== Changelog ==

= 1.2.2 =
* Improved: Approval Admin Roles and Notification Roles now list only dashboard-accessible roles (Subscriber, Customer, and similar front-end-only roles are excluded)

= 1.2.1 =
* New: Dedicated Auto-Approval Settings admin tab — auto-approval configuration moved out of General Settings
* Improved: Refined role card layout with a cleaner 3-column grid, compact cards, and responsive fallbacks for smaller screens

= 1.2.0 =
* New: Custom approval capability assignment (`uam_manage_approvals`) for selected dashboard roles
* New: Enhanced General Settings layout with Approval Admin Roles, Email Notification Settings, and relocated Auto-Approval section
* New: Notification Roles setting — send approval emails to all active users in selected roles
* New: Additional Notification Emails field with pill-style email tags UI and validation
* Improved: Email notification dispatcher routes to role members and custom addresses
* Improved: Approval actions, dashboard widget, and user profile controls now respect the custom capability

= 1.1.0 =
* Fix: Auto-approval now strictly respects selected roles only — unchecked roles always require manual approval
* Fix: Deferred registration processing so WooCommerce and custom role plugins assign the final role before approval is evaluated
* New: Role-based auto-approval selection via a modern checkbox grid with Select All / Deselect All controls
* Removed: Legacy global auto-approval override that could approve all roles regardless of settings
* Compatibility fixes and testing for WordPress 7.1

= 1.0.7 =
* New: Auto-approval for Customers checkbox — auto-approve Customer role users while other roles require manual approval

= 1.0.6 =
* Tested on WordPress 7.0

= 1.0.5 =
* New: Reset password button placeholder ({reset_password_button}) in User Approval Email; link uses your login URL and wp_lang
* New: Auto-approval checkbox in settings to allow new users to log in without manual approval

= 1.0.4 =
* Fix reset password link URL; add reset password button placeholder

= 1.0.3 =
* Fix errors

= 1.0.2 =
* Fix errors

= 1.0.1 =
* Initial release
* User approval workflow implemented
* Admin and user email notifications
* Login blocking until approval

== Upgrade Notice ==

= 1.2.2 =
Approval and Notification role pickers now show only dashboard-accessible roles. Review your saved role selections after upgrading.

= 1.2.1 =
Auto-approval settings now live in their own admin tab. Role cards use a refined 3-column layout.

= 1.2.0 =
Review Approval Admin Roles and Notification Roles after upgrading. Legacy administrator email fields are migrated to Additional Notification Emails.

= 1.1.0 =
Strict role-based auto-approval, improved settings UI, and WordPress 7.1 compatibility. Review your selected auto-approve roles after upgrading.

= 1.0.0 =
Initial release.
