WP Manifestindependent plugin directory
manifest / users / user-access

UM CSV Identity Whitelist

Restricts Ultimate Member user registration and login using a CSV-based whitelist. Validates users by first name, last name, and birth year.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/itsikram/user-access/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that integrates with Ultimate Member to restrict user registration and login using a CSV-based whitelist.

Description

This plugin validates user registration and login attempts against a whitelist stored in a custom database table. Users are only allowed to register or login if their first name, last name, and birth year match a record in the whitelist with allowed = "Y".

Features

  • CSV-Based Whitelist: Upload CSV files to manage the whitelist
  • Identity Validation: Validates users by first name, last name, and birth year
  • Registration Restriction: Blocks registration if user is not whitelisted
  • Login Restriction: Blocks login if user is not whitelisted
  • Birth Year Field: Automatically adds a Birth Year field to Ultimate Member registration forms
  • Admin Interface: Easy-to-use admin page for CSV uploads
  • Data Normalization: Automatically normalizes data (trim spaces, case handling)
  • Duplicate Prevention: Prevents duplicate records in the database
  • Efficient Lookups: Indexed database table for fast queries

Requirements

  • WordPress 5.0 or higher
  • PHP 7.4 or higher
  • Ultimate Member plugin (must be installed and activated)

Installation

  1. Upload the um-csv-identity-whitelist folder to /wp-content/plugins/
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Ensure Ultimate Member plugin is installed and activated
  4. Go to Users > CSV Whitelist to upload your CSV file

CSV Format

The CSV file must have the following structure:

fname,lname,birthyear,allowed
SARAH,BREDE,1984,Y
DAVID,BURNSON,1977,Y
JOHN,SMITH,1990,N

Column Requirements

  • fname: First name (text, will be normalized to uppercase)
  • lname: Last name (text, will be normalized to uppercase)
  • birthyear: Birth year (4-digit number, e.g., 1985)
  • allowed: Y or N (case-insensitive)

Notes

  • Column names are case-insensitive
  • First row must be the header row
  • Empty rows are skipped
  • Invalid rows are skipped and counted as errors
  • Duplicate records (same fname, lname, birthyear) will update the allowed field

Usage

Uploading a CSV File

  1. Navigate to Users > CSV Whitelist in WordPress admin
  2. Click "Choose File" and select your CSV file
  3. Optionally check "Replace Existing" to replace all existing records
  4. Click "Upload CSV"
  5. Review the import statistics

User Registration

When a user attempts to register:

  1. They must fill in First Name, Last Name, and Birth Year
  2. The plugin validates their information against the whitelist
  3. If not whitelisted, registration is blocked with an error message
  4. If whitelisted, registration proceeds normally

User Login

When a user attempts to login:

  1. The plugin validates their stored information against the whitelist
  2. If not whitelisted, login is blocked with an error message
  3. If whitelisted, login proceeds normally

Database Structure

The plugin creates a custom table: wp_um_csv_whitelist

Table Structure:

  • id (bigint) - Primary key
  • fname (varchar) - First name (indexed)
  • lname (varchar) - Last name (indexed)
  • birthyear (varchar) - Birth year (indexed)
  • allowed (varchar) - Y or N (indexed)
  • created_at (datetime) - Record creation timestamp
  • Unique constraint on (fname, lname, birthyear)

Security

  • Nonce verification for all admin actions
  • Capability checks (requires manage_options)
  • File type validation (CSV only)
  • SQL injection prevention (prepared statements)
  • Data sanitization and validation

Hooks

Filters

  • um_submit_form_errors_hook__registration - Validates registration
  • authenticate - Validates login
  • um_custom_error_message_handler - Custom error messages

Actions

  • um_after_register_fields - Adds Birth Year field to registration form
  • um_before_save_registration_details - Saves Birth Year field
  • login_message - Shows login error messages

Error Messages

  • Registration Denied: "Your registration/login has been denied. Your identity information does not match our whitelist. Please contact support if you believe this is an error."
  • CSV Upload Errors: Various validation errors are shown for invalid CSV files

Troubleshooting

Plugin doesn't work

  1. Ensure Ultimate Member is installed and activated
  2. Check that the database table was created (check database)
  3. Verify CSV format matches requirements
  4. Check WordPress error logs

Users can't register/login

  1. Verify CSV file was uploaded successfully
  2. Check that user's information matches whitelist exactly (case-insensitive)
  3. Ensure allowed field is set to "Y" for the user
  4. Check that Birth Year field is being filled during registration

CSV upload fails

  1. Verify CSV file format matches requirements
  2. Check file size (max 10MB)
  3. Ensure file is actually a CSV file
  4. Check WordPress error logs for detailed error messages

Support

For support, please contact the plugin developer or check the WordPress support forums.

Changelog

1.0.0

  • Initial release
  • CSV upload functionality
  • Registration and login validation
  • Birth Year field integration
  • Admin interface

License

GPL v2 or later

user-access