=== 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.1.0
Requires PHP: 7.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Requires admin approval for new sign-ups. Specific roles can be auto-approved, while remaining users 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
* Sends notification email to up to **two administrator email addresses**
* Approve or reject users directly from email buttons
* **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.

= How many administrators receive approval emails? =
You can define up to two email addresses in the plugin settings.

= What happens if a user is rejected? =
The user remains unable to log in. You may optionally inform them via custom messaging.

= 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. In General Settings, 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. User pending approval notification email
3. Approval email with approve / reject buttons
4. User approval notification email

== Changelog ==

= 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.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.
