PHPackages                             danepete/drupal-user-email-domain - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. danepete/drupal-user-email-domain

ActiveDrupal-module[Validation &amp; Sanitization](/categories/validation)

danepete/drupal-user-email-domain
=================================

Drupal module that restricts user email addresses to a configurable list of approved domains during registration and profile editing, with override permissions for administrators.

v1.2.0(3mo ago)07GPL-2.0-or-laterPHP

Since Apr 15Pushed 3mo agoCompare

[ Source](https://github.com/DanePete/drupal-user-email-domain)[ Packagist](https://packagist.org/packages/danepete/drupal-user-email-domain)[ RSS](/packages/danepete-drupal-user-email-domain/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

User Email Domain
=================

[](#user-email-domain)

A Drupal module that restricts user email addresses to approved domains during registration and profile editing.

Features
--------

[](#features)

- **Domain allowlist** -- configure approved email domains (e.g. `example.org, example.com`) via a simple admin form.
- **Registration and profile enforcement** -- validates the email field on both `user_register_form` and `user_form`.
- **Admin override permission** -- users with the `override useremaildomain` permission can bypass the restriction.
- **Locked email for non-matching users** -- if an admin previously set an email outside the approved domains, the user cannot change it themselves.
- **Custom help text** -- configurable description shown on the email field.
- **Multi-address handling** -- gracefully handles input with multiple addresses, accepting the first valid one.
- **Logging** -- logs attempts to use unapproved domains to the watchdog.

Requirements
------------

[](#requirements)

- Drupal 10.3+ or 11.x
- PHP 8.1+

Installation
------------

[](#installation)

Add the repository to your project's `composer.json`:

```
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/DanePete/drupal-user-email-domain"
        }
    ]
}
```

Then install:

```
composer require danepete/drupal-user-email-domain
drush en useremaildomain
```

Configuration
-------------

[](#configuration)

Administration &gt; Configuration &gt; People &gt; User Email Domains (`/admin/config/people/useremaildomain`)

Enter approved email domains separated by commas. Leave empty to allow all domains.

Permissions
-----------

[](#permissions)

PermissionDescription**Administer user email domains**Define which domains are permitted in user email addresses.**Override user email domain restrictions**Bypass the domain allowlist when registering or editing a user.License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance81

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

100d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/25e37a6918d20e4770a540fbdb1d97e9da5b81ce58b9802d69e55d8836a0a6dd?d=identicon)[DanePete](/maintainers/DanePete)

### Embed Badge

![Health badge](/badges/danepete-drupal-user-email-domain/health.svg)

```
[![Health](https://phpackages.com/badges/danepete-drupal-user-email-domain/health.svg)](https://phpackages.com/packages/danepete-drupal-user-email-domain)
```

###  Alternatives

[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M425](/packages/drupal-core-recommended)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
