Skip to content
Snippets Groups Projects
Commit 30feb860 authored by Jared Hancock's avatar Jared Hancock
Browse files

Migrate pwreset and access link template to content

parent 390969d2
Branches
Tags
No related merge requests found
...@@ -79,14 +79,6 @@ class EmailTemplateGroup { ...@@ -79,14 +79,6 @@ class EmailTemplateGroup {
'group'=>'ticket.staff', 'group'=>'ticket.staff',
'name'=>'Overdue Ticket Alert', 'name'=>'Overdue Ticket Alert',
'desc'=>'Alert sent to staff on stale or overdue tickets.'), 'desc'=>'Alert sent to staff on stale or overdue tickets.'),
'staff.pwreset' => array(
'group'=>'sys',
'name' => 'Staff Password Reset',
'desc' => 'Notice sent to staff with the password reset link.'),
'user.accesslink' => array(
'group'=>'sys',
'name' => 'User Access Link Recovery',
'desc' => 'Notice sent to user on request with ticket access link.'),
); );
function EmailTemplateGroup($id){ function EmailTemplateGroup($id){
......
#
# Email template: staff.pwreset
#
# Sent when a staff member requests a password reset via the <a>Forgot my
# password</a> link in the staff control login screen
#
---
notes: |
Sent when a staff member requests a password reset via the <a>Forgot my
password</a> link in the staff control login screen
subject: |
osTicket Staff Password Reset
body: |
<h3><strong>Hi %{staff.name.first},</strong></h3>
A password reset request has been submitted on your behalf for the
helpdesk at %{url}.
<br>
<br>
If you feel that this has been done in error, delete and disregard this
email. Your account is still secure and no one has been given access to
it. It is not locked and your password has not been reset. Someone could
have mistakenly entered your email address.
<br>
<br>
Follow the link below to login to the help desk and change your
password.
<br>
<br>
<a href="%{reset_link}">%{reset_link}</a>
<br>
<br>
<em style="font-size: small">Your friendly Customer Support System</em>
<br>
<img src="cid:b56944cb4722cc5cda9d1e23a3ea7fbc" alt="Powered by osTicket"
width="126" height="19" style="width: 126px;">
#
# Email template: user.accesslink
#
# Sent when a user requests an access link to check the status of a ticket
#
#
#
---
notes: |
Sent when a user requests an access link to check the status of a ticket
subject: |
Ticket [#%{ticket.number}] Access Link
body: |
<h3><strong>Hi %{recipient.name.first},</strong></h3>
An access link request for ticket #%{ticket.number} has been submitted on your behalf for the
helpdesk at %{url}.
<br>
<br>
Follow the link below to check the status of the ticket #%{ticket.number}.
<br>
<br>
<a href="%{recipient.ticket_link}">%{recipient.ticket_link}</a>
<br>
<br>If you <strong>did not</strong> make the request, please delete
and disregard this email. Your account is still secure and no one has
been given access to the ticket. Someone could have mistakenly entered
your email address.
<br>
<br>
--<br>
%{company.name}
...@@ -88,6 +88,34 @@ CREATE TABLE `%TABLE_PREFIX%organization` ( ...@@ -88,6 +88,34 @@ CREATE TABLE `%TABLE_PREFIX%organization` (
DELETE FROM `%TABLE_PREFIX%config` where `namespace`='core' DELETE FROM `%TABLE_PREFIX%config` where `namespace`='core'
AND `key` = 'show_related_tickets'; AND `key` = 'show_related_tickets';
-- Transfer access link template
INSERT INTO `%TABLE_PREFIX%content`
(`name`, `body`, `type`, `isactive`)
SELECT A1.`subject`, A1.`body`, 'access-link', 1
FROM `%TABLE_PREFIX%email_template` A1
WHERE A1.`tpl_id` = (SELECT `value` FROM `%TABLE_PREFIX%config` A3
WHERE A3.`key` = 'default_template_id' and `namespace` = 'core')
AND A1.`code_name` = 'user.accesslink';
UPDATE `%TABLE_PREFIX%content` SET `content_id` = LAST_INSERT_ID()
WHERE `id` = LAST_INSERT_ID();
-- Transfer staff password reset link
INSERT INTO `%TABLE_PREFIX%content`
(`name`, `body`, `type`, `isactive`)
SELECT A1.`subject`, A1.`body`, 'pwreset-staff', 1
FROM `%TABLE_PREFIX%email_template` A1
WHERE A1.`tpl_id` = (SELECT `value` FROM `%TABLE_PREFIX%config` A3
WHERE A3.`key` = 'default_template_id' and `namespace` = 'core')
AND A1.`code_name` = 'staff.pwreset';
UPDATE `%TABLE_PREFIX%content` SET `content_id` = LAST_INSERT_ID()
WHERE `id` = LAST_INSERT_ID();
-- No longer saved in the email_template table
DELETE FROM `%TABLE_PREFIX%email_template`
WHERE `code_name` IN ('staff.pwreset', 'user.accesslink');
-- Finished with patch -- Finished with patch
UPDATE `%TABLE_PREFIX%config` UPDATE `%TABLE_PREFIX%config`
SET `value` = '4323a6a81c35efbf7722b7fc4e475440' SET `value` = '4323a6a81c35efbf7722b7fc4e475440'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment