-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41038 from nextcloud/fix-#41005-Resend-welcome-email
Fix: #41005 Resend welcome email
- Loading branch information
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
/** | ||
* @copyright Copyright (c) 2016, ownCloud, Inc. | ||
* @copyright Copyright (c) 2023, Ezhil Shanmugham <[email protected]> | ||
* | ||
* @author Arthur Schiwon <[email protected]> | ||
* @author Bjoern Schiessle <[email protected]> | ||
|
@@ -25,6 +26,7 @@ | |
* @author Tom Needham <[email protected]> | ||
* @author Vincent Petry <[email protected]> | ||
* @author Kate Döen <[email protected]> | ||
* @author Ezhil Shanmugham <[email protected]> | ||
* | ||
* @license AGPL-3.0 | ||
* | ||
|
@@ -1546,7 +1548,12 @@ public function resendWelcomeMessage(string $userId): DataResponse { | |
} | ||
|
||
try { | ||
$emailTemplate = $this->newUserMailHelper->generateTemplate($targetUser, false); | ||
if ($this->config->getUserValue($targetUser->getUID(), 'core', 'lostpassword')) { | ||
$emailTemplate = $this->newUserMailHelper->generateTemplate($targetUser, true); | ||
} else { | ||
$emailTemplate = $this->newUserMailHelper->generateTemplate($targetUser, false); | ||
} | ||
|
||
$this->newUserMailHelper->sendMail($targetUser, $emailTemplate); | ||
} catch (\Exception $e) { | ||
$this->logger->error( | ||
|