Account Unblock

Component ID

2826490

Component name

Account Unblock

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Account Unblock

--------------
This module was developed to give users a way to unblock their account through dedicated URLs and a secure process. By default, Drupal doesn't offer a way to allow users to unblock their own account after it has been blocked for different reasons such as a forgotten password leading to too many failed login attempts, or others.

With Account Unblock module, blocked users are provided with the URL /user/unblock presenting a form where they can specify their username/email. By submitting - if the account exists and is blocked -, the user will recieve an email containing a secure one-time token-based URL and the instructions to unblock their account. Accessing this secure URL will provide the user with a form to reset their password, that will unblock their account on a successful submit.

A Notice event log is saved with the "user" type everytime an account unblock
notification has been requested and sent.

Installation

------------
To install copy the account_unblock folder in your modules directory. Go to
the Admin Modules page at /admin/modules and under the "Other" frame the
"Account Unblock" module Item will appear in the list. Enable the Checkbox
and save the configuration.

Configuration options

---------------------
You should have the 'administer site configuration' permission to configure the
Account Unblock module.

Go to the Account Unblock Settings page at /admin/config/people/account-unblock
and a form with the module options will be shown.

  • Account unblock secure URL expiration time
    The secure URL expiration time, in hours. Number of hours after which the secure
    URL won't work anymore and the user will have to request a new one.
    Default to 24 hours.
  • Notification mail subject
    The email subject that will be sent to the user when an account unblock is requested.
    Default to
    Account unblock request for %username% at %site%
  • Notification mail template
    The email template that will be sent to the user when an account unblock is requested.

The strings could be personalized using the following placeholders:

%date% : The (formatted) date and time of the operation
%ip% : The IP Address performing the operation
%username% : The username of the user requesting the operation
%email% : If the user exists, its email
%uid% : If the user exists, its uid
%site% : The configured site's name
%uri% : The base url of the Drupal site
%unblock_uri% : Direct link to account unblock form path
%expiration_time% : Configured secure url expiration time in hours
%secure_link% : The secure URL that the user can access to unblock its account

Default to

%username%,

A request to unblock your account has been made at %site%.

You can now attempt to unblock your account by clicking this link or copying
and pasting it into your browser:

%secure_link%

This link can only be used once to unblock the account and will lead you to
a page where you can set a new password. It expires after %expiration_time%
hours and nothing will happen if it's not used.

-- %site% team