mirror of https://github.com/MISP/MISP
fix: [mail] Fix body of passwordReset/newUser emails
When MISP sends an email with new credentials, the body is generated from one of the configured templates - passwordResetText or newUserText. However, these two templates were swapped - the newUserText was used for password reset, while passwordResetText was used when new account is created. This commit fixes it.pull/5985/head
parent
101db23499
commit
369341683d
|
@ -1158,7 +1158,7 @@ class User extends AppModel
|
|||
public function initiatePasswordReset($user, $firstTime = false, $simpleReturn = false, $fixedPassword = false)
|
||||
{
|
||||
$org = Configure::read('MISP.org');
|
||||
$options = array('passwordResetText', 'newUserText');
|
||||
$options = array('newUserText', 'passwordResetText');
|
||||
$subjects = array('[' . $org . ' MISP] New user registration', '[' . $org . ' MISP] Password reset');
|
||||
$textToFetch = $options[($firstTime ? 0 : 1)];
|
||||
$subject = $subjects[($firstTime ? 0 : 1)];
|
||||
|
|
Loading…
Reference in New Issue