WP Manifestindependent plugin directory
manifest / users / simple-user-verification

Simple User Verification

Sends a verification email after user registration and activates the user upon verification. Uses the user_status column.

by Travis Peacock · github.com/teamcoltra/simple-user-verification

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/teamcoltra/simple-user-verification/archive/refs/heads/main.zip

Simple User Email Verification

Simple User Email Verification is a WordPress plugin designed to enhance the user registration process by requiring email verification before activating an account. It uses the user_status column to track activation status.


Features

  • Sends a verification email upon user registration.
  • Activates the user account only after email verification.
  • Provides a "Resend Verification" option for users who have not yet verified.
  • Blocks unverified users from logging in.
  • Includes REST API support for headless or decoupled setups.

Installation

  1. Download the Plugin: Clone or download the plugin files.
  2. Upload the Plugin: Upload the simple-user-email-verification folder to your WordPress wp-content/plugins/ directory.
  3. Activate the Plugin: Go to the WordPress admin dashboard and activate the plugin via the Plugins menu.

How It Works

  1. Registration: When a user registers, they receive an email with a unique verification link.
  2. Verification: The link contains a verification code. Once clicked, the code is validated, and the user is activated.
  3. Login Restriction: Unverified users are blocked from logging in until their email is verified.
  4. Resend Verification: Unverified users can request a new verification email from the login page.

Usage

Email Verification

After registration, the user receives an email with a link. They must click the link to activate their account.

Login Messages

The plugin displays custom messages on the login screen:

  • Account Created: Account created. Please check your email to verify your account.
  • Verification Successful: Your account has been verified! You can now log in.
  • Verification Failed: Invalid or expired verification code.

Resend Verification

Users who have not verified their accounts can:

  • Visit the login page and click "Resend Verification."
  • Enter their email address to receive a new verification link.

REST API

The plugin includes a REST API endpoint for resending verification emails in headless or decoupled applications.

Endpoint:

POST /wp-json/suev/v1/resend_verification

Parameters:

  • email (string): The email address of the user.

Response:

  • Success: { "message": "Verification email resent. Please check your inbox." }
  • Errors: Returns appropriate error messages for invalid email or already verified users.

Filters and Actions

  • user_register: Triggers the email verification process after user registration.
  • authenticate: Blocks login for unverified users.
  • registration_redirect: Redirects users after registration to show a custom message.
  • login_message: Displays verification-related messages on the login page.

Customization

Verification Email

You can customize the email content by editing the suev_user_registration function in the plugin file.

Messages

Modify the displayed messages by editing the suev_login_message and suev_resend_verification_message functions.


License

This plugin is open-source and distributed under the GNU General Public License v2.0 or later.