Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

πŸ‡ΊπŸ‡¦

This module is maintained by Ukrainian developers.
Please consider supporting Ukraine in a fight for their freedom and safety of Europe.

This is a very simple, lightweight module that will redirect anonymous users to the login page whenever they reach any admin-specified page paths, and will direct them back to the originally-requested page after successful login.

Use-case examples

1) You want to restrict your entire site to authenticated users. Simply enter "*" as the only path to redirect and all anonymous traffic will be redirected to the login page.

2) Your website sends out emails that contain links that only authenticated users can reach (edit your account, edit a node, view a private message, etc). If the user clicks the link from the email and they are not currently logged in they will reach an "Access denied" page; which is horrible for usability. With this module enabled and configured to act on node/*/edit paths, if a user clicks a link to site.com/node/123/edit, they will be redirected to site.com/user/login?destination=node/123/edit, so they can log in, then be brought to the page originally requested.

Configuration

After enabling the module, navigate to the admin settings page (D7: admin/config/system/anonymous-login, D8: admin/config/user-interface/anonymous-login). You can then enter a list of page paths (wildcards [*] are supported), which will redirect anonymous users to the login page when visited. Also supported are patterns for which paths will be ignored.
To exclude some paths for a multilingual site you can use wildcards [*]:

~/*/user/register
~/*/user/password

or use language prefixes (e.g. for English and Spanish):

~/en/user/register
~/en/user/password
~/es/user/register
~/es/user/password

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Dec 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Core Release date
8.x-2.2 Stable Dec 19, 2024