From a5555b2596c8ca8bbb21414246d1a80e9f8d645d Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 5 Jun 2018 21:52:22 -0300 Subject: [PATCH] Fix email links --- .../controllers/system/disable-user-system.php | 17 +++++++++-------- .../controllers/system/enable-user-system.php | 3 ++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/server/controllers/system/disable-user-system.php b/server/controllers/system/disable-user-system.php index b1245c94..a5da2419 100755 --- a/server/controllers/system/disable-user-system.php +++ b/server/controllers/system/disable-user-system.php @@ -17,8 +17,8 @@ * @apiUse NO_PERMISSION * @apiUse INVALID_PASSWORD * @apiUse SYSTEM_USER_IS_ALREADY_DISABLED - * - * @apiSuccess {Object} data Empty object + * + * @apiSuccess {Object} data Empty object * */ @@ -53,12 +53,12 @@ class DisableUserSystemController extends Controller { foreach($userList as $user) { $ticketNumberList = ''; - + foreach($user->sharedTicketList as $ticket) { $ticket->authorEmail = $user->email; $ticket->authorName = $user->name; $ticket->author = null; - + $ticketNumberList .= $ticket->ticketNumber . ' - ' . $ticket->title . '
'; $ticket->store(); } @@ -68,14 +68,15 @@ class DisableUserSystemController extends Controller { $mailSender->setTemplate(MailTemplate::USER_SYSTEM_DISABLED, [ 'to' => $user->email, 'name' => $user->name, - 'tickets' => $ticketNumberList + 'tickets' => $ticketNumberList, + 'url' => Setting::getSetting('url')->getValue() ]); $mailSender->send(); - + $user->delete(); } - + Response::respondSuccess(); } -} \ No newline at end of file +} diff --git a/server/controllers/system/enable-user-system.php b/server/controllers/system/enable-user-system.php index d1d96c03..a29ad339 100755 --- a/server/controllers/system/enable-user-system.php +++ b/server/controllers/system/enable-user-system.php @@ -91,7 +91,8 @@ class EnableUserSystemController extends Controller { $mailSender->setTemplate(MailTemplate::USER_SYSTEM_ENABLED, [ 'to' => $email, 'name' => $name, - 'password' => $password + 'password' => $password, + 'url' => Setting::getSetting('url')->getValue(), ]); $mailSender->send();