Created
February 6, 2017 21:57
-
-
Save shrop/31edc1fbe4f62d4637b02da9da65f9b4 to your computer and use it in GitHub Desktop.
Send Drupal 7 Password Reset Email
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Array of user IDs to email. | |
$uids = array('1'); | |
// Loop through array of uids and attempt to send password reset emails. | |
foreach ($uids as $uid) { | |
// Load a user. | |
$account = user_load($uid); | |
// Invoke the email. It will be queued along with other system mail to be sent during cron | |
_user_mail_notify('password_reset', $account); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment