2

I am running a private Drupal 7 site where all user accounts are created by admins and managers. I need to ensure that all users have access to the email account that their accounts were created with.

What is the best way to do the following:

  • Create a user account with an automatically generated password, and notify the new user of their password via email.
  • After a 4 week period, a new password must be generated for the user and set as their active password automatically. The user needs to be notified of their newly updated password via email, and the newly generated password must be used to access the site until it is reset again.

Are there any Drupal 7 modules that can help achieve this? Any suggestions on building a custom module that can help resolve this?

Adrian Cid Almaguer
  • 7,815
  • 13
  • 41
  • 63

1 Answers1

0

You can use the Mass Password Reset module, read the module description:

This module allows users with "Administer users" permission to reset all user accounts and notify all users

Details

The module will reset the passwords of all users except the administrative superuser id 1. You can optionally reset the administrative superuser id 1. Once passwords have been reset, users will optionally receive emails using the Drupal password recovery email. The password recovery email content can be edited at the account settings configuration page.

Use cases

You have a large number of user accounts pre-created and want to send password recovery emails to all users during a site launch. You need to quickly change all passwords on a site for security reasons.

And you can use the Force Password Change module too:

This module allows administrators to force users, by role, individual user, or newly created user, to change their password on their next page load or login, and/or expire their passwords after a period of time.

As Patrick W says: You can use the Generate Password module:

Great utility module which makes the password field optional (or hidden) on the add new user page (admin & registration). If the password field is not set during registration, the system will generate a password. You can optionally display this password at the time it's created.

Reference:

https://drupal.stackexchange.com/q/187633/28275

Community
  • 1
  • 1
Adrian Cid Almaguer
  • 7,815
  • 13
  • 41
  • 63
  • 1
    The Generate Password module might be a good approach for new users: https://www.drupal.org/project/genpass – firewaller Apr 13 '16 at 09:12