Skip to content

Commit 5013cf2

Browse files
erikbocksGaOrtigasureshanaparti
authored
Fix user password reset mail template value (#12882)
* Fix default user password reset email template * improve readabilty * change update query * Specify database for update * Fix SQL statement * Use CONCAT_WS sql method to create multiline string --------- Co-authored-by: GaOrtiga <49285692+GaOrtiga@users.noreply.github.com> Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
1 parent 0c86899 commit 5013cf2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

engine/schema/src/main/resources/META-INF/db/schema-42200to42210.sql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,10 @@ DELETE FROM `cloud`.`configuration` WHERE name = 'consoleproxy.cmd.port';
5353

5454
-- Drops the unused "backup_interval_type" column of the "cloud.backups" table
5555
ALTER TABLE `cloud`.`backups` DROP COLUMN `backup_interval_type`;
56+
57+
-- Update `user.password.reset.mail.template` configuration value to match new logic
58+
UPDATE `cloud`.`configuration`
59+
SET value = CONCAT_WS('\n', 'Hello {{username}}!', 'You have requested to reset your password. Please click the following link to reset your password:', '{{{resetLink}}}', 'If you did not request a password reset, please ignore this email.', '', 'Regards,', 'The CloudStack Team')
60+
WHERE name = 'user.password.reset.mail.template'
61+
AND value IN (CONCAT_WS('\n', 'Hello {{username}}!', 'You have requested to reset your password. Please click the following link to reset your password:', 'http://{{{resetLink}}}', 'If you did not request a password reset, please ignore this email.', '', 'Regards,', 'The CloudStack Team'), CONCAT_WS('\n', 'Hello {{username}}!', 'You have requested to reset your password. Please click the following link to reset your password:', '{{{domainUrl}}}{{{resetLink}}}', 'If you did not request a password reset, please ignore this email.', '', 'Regards,', 'The CloudStack Team'));
62+

0 commit comments

Comments
 (0)