Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Domain Login Restrict

192 sites Security covered Drupal 8–11 Domain ecosystem
View on drupal.org

This module restricts user logins based on their assigned domain, with options for domain-specific role control and the ability to assign domains and roles to new users. It also allows for certain roles to bypass these login restrictions.

Domain Login Restrict

This module provide functionality to restrict the user login based on domain
assigned to user. It also provide domain wise setting for Roles control login
if there domain specific role required.

Requirements

* PHP v7.2+
* Drupal 8 | 9

Installation (Web UI)

* Install as you would normally install a contributed Drupal module. Visit
https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-mod...
for further information.
- with drush
```drush pm-enable -y domain_login_restrict```

REQUIREMENTS
------------

This module require Domain module.

Usage

###Configure Global Domain affiliation Setting:
#### Validate User associated domain during login
* Visit : /admin/config/domain/settings (Domain settings), you will the
section 'Domain User: Login restrict' with Checkbox.
* If this checkbox is selected then every time user login is validated
against domain assigned to user under user edit screen for 'Domain Access'.
* If user does not have affiliation with domain and try to login, this module
will not allow it.
* To bypass this validation for admin or other users with higher access, you
can check permission called 'login to any domain' of few roles. whoever
having this permission validation process get skipped for theme.

#### Assign Current Domain to the newly created user.
* Field 'Assign Domain to User'
* This assign Current domain to the new users.

### Configure Domain Specific Setting using roles:
#### Validate User roles with Domain specific roles:
* Visit : 'admin/config/domain' then click on edit link for any of the domain,
url will be like 'admin/config/domain/edit/DOMAIN_ID'
* you will see 'Domain User: Login restrict using Role' section, it display
all roles with checkboxes.
* Once you checked some role, then only user with role present on this domain
allow to login.
* To bypass this validation for admin or other users with higher access, you
can check permission called 'login to any domain' of few roles. whoever
having this permission validation process get skipped for theme.

#### Assign roles to new users with Domain specific roles:
* Field 'Assign Role to New User'
* This assign selected roles to newly created user to this current domain.

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jun 2026
Latest release
2 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
8.x-1.4 Stable 8–11 Jun 14, 2026
8.x-1.3 Stable 8–11 Jun 1, 2026