Merge branch '2.4' into develop

pull/7392/head
iglocska 2021-04-28 15:34:49 +02:00
commit ad37454e89
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
3 changed files with 3 additions and 2 deletions

View File

@ -1739,6 +1739,7 @@ class UsersController extends AppController
// Fetch user that contains also PGP or S/MIME keys for e-mail encryption
$userForSendMail = $this->User->getUserById($user_id);
$body = str_replace('\n', PHP_EOL, $body);
$result = $this->User->sendEmail($userForSendMail, $body, false, "[MISP] Email OTP");
if ($result) {

View File

@ -806,7 +806,6 @@ class User extends AppModel
$gpg = $this->initializeGpg();
$sendEmail = new SendEmail($gpg);
try {
$result = $sendEmail->sendToUser($user, $subject, $body, $bodyNoEnc,$replyToUser ?: []);
@ -943,6 +942,7 @@ class User extends AppModel
}
$body = str_replace('$password', $password, $body);
$body = str_replace('$username', $user['User']['email'], $body);
$body = str_replace('\n', PHP_EOL, $body);
$result = $this->sendEmail($user, $body, false, $subject);
if ($result) {
$this->id = $user['User']['id'];

@ -1 +1 @@
Subproject commit e72cf95275f217e596fe2583fc137b6c9bd1d896
Subproject commit 4b88a52cf4ac34b1ee23eaefe95aa9389a130b73