diff options
author | Ezhil Shanmugham <ezhil930@gmail.com> | 2023-10-21 20:42:01 +0530 |
---|---|---|
committer | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2024-02-23 21:46:17 +0100 |
commit | ef1d9c61e0a700bcf5f2efc7434ab24f579a180c (patch) | |
tree | cc8e7965746631382d5c3e02dc12c8993f3ebb30 /apps/provisioning_api/lib/Controller/UsersController.php | |
parent | 7cf3172f1ced2d1d8d376140e0268a860d228b0b (diff) | |
download | nextcloud-server-ef1d9c61e0a700bcf5f2efc7434ab24f579a180c.tar.gz nextcloud-server-ef1d9c61e0a700bcf5f2efc7434ab24f579a180c.zip |
Fix: #41005 Resend welcome email
Signed-off-by: Ezhil Shanmugham <ezhil930@gmail.com>
Diffstat (limited to 'apps/provisioning_api/lib/Controller/UsersController.php')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 1920128d246..3d0cbd43124 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -4,6 +4,7 @@ declare(strict_types=1); /** * @copyright Copyright (c) 2016, ownCloud, Inc. + * @copyright Copyright (c) 2023, Ezhil Shanmugham <ezhil930@gmail.com> * * @author Arthur Schiwon <blizzz@arthur-schiwon.de> * @author Bjoern Schiessle <bjoern@schiessle.org> @@ -25,6 +26,7 @@ declare(strict_types=1); * @author Tom Needham <tom@owncloud.com> * @author Vincent Petry <vincent@nextcloud.com> * @author Kate Döen <kate.doeen@nextcloud.com> + * @author Ezhil Shanmugham <ezhil930@gmail.com> * * @license AGPL-3.0 * @@ -1546,7 +1548,12 @@ class UsersController extends AUserData { } 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( |