Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Our client has a requirement to allow users with specific email domains to be able to login with local accounts.
Proposed resolution
Add a configuration option for allowing specific email domains to login with local accounts, similar to the existing allow_default_login_roles and allow_default_login_users options. Patch coming soon.
Comment | File | Size | Author |
---|---|---|---|
#2 | allow_logging_in_with-2886270-2.patch | 3.53 KB | malik.kotob |
Comments
Comment #2
malik.kotob CreditAttribution: malik.kotob commentedHere's a patch that has been tested and behaves the same way as the allow_default_login_users config option.
Comment #3
malik.kotob CreditAttribution: malik.kotob commentedComment #4
dakku CreditAttribution: dakku as a volunteer commented@malik.kotob I think thats a really useful addition. I would be keen to get this included, Can you re-roll the patch against the latest dev version?
Comment #5
joelpittetAs a suggestion it may be good to either log and/or notify the user about the email domain?
Comment #6
mstrelan CreditAttribution: mstrelan commentedOn the flipside, I have the opposite requirement. I need to prevent users with a particular domain from logging in with a local account, since they should exist in the IdP. I wonder if that could be combined with this?
Comment #7
drupalevangelist CreditAttribution: drupalevangelist as a volunteer commentedWill this patch be a part of an upcoming release?