Last active
May 21, 2020 17:30
-
-
Save jairsjunior/d252406942a5b049589f835177c3ae52 to your computer and use it in GitHub Desktop.
Moodle 3.7 send email with password on bulk registration
This file contains 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
//file moodleFolder/admin/tool/uploaduser/index.php | |
//line ~ 843 | |
//Comment the first line of if and add this another 3 lines to when | |
//bulk create user without password generate pass and send e-mail. | |
if ($user->password === 'to be generated') { | |
// set_user_preference('create_password', 1, $user); | |
setnew_password_and_mail($user); | |
unset_user_preference('create_password', $user); | |
set_user_preference('auth_forcepasswordchange', 1, $user); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment