organization password reset email added + scheduler fixes
This commit is contained in:
parent
606233361f
commit
dd15673752
15 changed files with 541 additions and 9 deletions
|
@ -9598,6 +9598,121 @@ UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordExpirationLetterT
|
|||
GO
|
||||
|
||||
|
||||
-- USER PASSWORD RESET EMAIL TEMPLATE
|
||||
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'From' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'From', N'support@HostingCompany.com')
|
||||
END
|
||||
GO
|
||||
|
||||
DECLARE @UserPasswordResetLetterHtmlBody nvarchar(2500)
|
||||
|
||||
Set @UserPasswordResetLetterHtmlBody = N'<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Password expiration notification</title>
|
||||
<style type="text/css">
|
||||
.Summary { background-color: ##ffffff; padding: 5px; }
|
||||
.Summary .Header { padding: 10px 0px 10px 10px; font-size: 16pt; background-color: ##E5F2FF; color: ##1F4978; border-bottom: solid 2px ##86B9F7; }
|
||||
.Summary A { color: ##0153A4; }
|
||||
.Summary { font-family: Tahoma; font-size: 9pt; }
|
||||
.Summary H1 { font-size: 1.7em; color: ##1F4978; border-bottom: dotted 3px ##efefef; }
|
||||
.Summary H2 { font-size: 1.3em; color: ##1F4978; }
|
||||
.Summary TABLE { border: solid 1px ##e5e5e5; }
|
||||
.Summary TH,
|
||||
.Summary TD.Label { padding: 5px; font-size: 8pt; font-weight: bold; background-color: ##f5f5f5; }
|
||||
.Summary TD { padding: 8px; font-size: 9pt; }
|
||||
.Summary UL LI { font-size: 1.1em; font-weight: bold; }
|
||||
.Summary UL UL LI { font-size: 0.9em; font-weight: normal; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="Summary">
|
||||
<div class="Header">
|
||||
<img src="#logoUrl#">
|
||||
</div>
|
||||
<h1>Password reset notification</h1>
|
||||
|
||||
<ad:if test="#user#">
|
||||
<p>
|
||||
Hello #user.FirstName#,
|
||||
</p>
|
||||
</ad:if>
|
||||
|
||||
<p>
|
||||
We received a request to reset the password for your account. If you made this request, click the link below. If you did not make this request, you can ignore this email.
|
||||
</p>
|
||||
|
||||
<a href="#passwordResetLink#">#passwordResetLink#</a>
|
||||
|
||||
|
||||
<p>
|
||||
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Best regards
|
||||
</p>
|
||||
</div>
|
||||
</body>';
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'HtmlBody' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'HtmlBody', @UserPasswordResetLetterHtmlBody)
|
||||
END
|
||||
ELSE
|
||||
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetLetterHtmlBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'HtmlBody'
|
||||
GO
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'Priority' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'Priority', N'Normal')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'Subject' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'Subject', N'Password reset notification')
|
||||
END
|
||||
GO
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'LogoUrl' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'LogoUrl', N'https://controlpanel.virtuworks.net/App_Themes/Default/Images/logo.png')
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
DECLARE @UserPasswordResetLetterTextBody nvarchar(2500)
|
||||
|
||||
Set @UserPasswordResetLetterTextBody = N'=========================================
|
||||
Password reset notification
|
||||
=========================================
|
||||
|
||||
<ad:if test="#user#">
|
||||
Hello #user.FirstName#,
|
||||
</ad:if>
|
||||
|
||||
We received a request to reset the password for your account. If you made this request, click the link below. If you did not make this request, you can ignore this email.
|
||||
|
||||
#passwordResetLink#
|
||||
|
||||
If you have any questions regarding your hosting account, feel free to contact our support department at any time.
|
||||
|
||||
Best regards'
|
||||
|
||||
IF NOT EXISTS (SELECT * FROM [dbo].[UserSettings] WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'TextBody' )
|
||||
BEGIN
|
||||
INSERT [dbo].[UserSettings] ([UserID], [SettingsName], [PropertyName], [PropertyValue]) VALUES (1, N'UserPasswordResetLetter', N'TextBody', @UserPasswordResetLetterTextBody)
|
||||
END
|
||||
ELSE
|
||||
UPDATE [dbo].[UserSettings] SET [PropertyValue] = @UserPasswordResetLetterTextBody WHERE [UserID] = 1 AND [SettingsName]= N'UserPasswordResetLetter' AND [PropertyName]= N'TextBody'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
-- ORGANIZATION USER PASSWORD RESET TOKENS
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue