Add link to users settings page in admin notification email

This commit is contained in:
Neraste 2018-09-06 15:50:50 +02:00 committed by Pellaeon Lin
parent 7341c68b20
commit ea7a4d1e75
3 changed files with 6 additions and 1 deletions

View File

@ -147,9 +147,12 @@ class MailService {
* @throws \Exception
*/
private function sendNewUserNotifEmail(array $to, $username, $userIsEnabled) {
$link = $this->urlGenerator->linkToRoute('settings_users');
$link = $this->urlGenerator->getAbsoluteURL($link);
$template_var = [
'user' => $username,
'sitename' => $this->defaults->getName()
'sitename' => $this->defaults->getName(),
'link' => $link,
];
// handle user enableness

View File

@ -1,2 +1,3 @@
<?php
echo $l->t('A new user "%s" has created an account on %s and awaits admin approbation', [$_['user'], $_['sitename']]);
echo str_replace('{link}', $_['link'], '<br/><br/><a href="{link}">{link}</a>');

View File

@ -1,2 +1,3 @@
<?php
echo $l->t('A new user "%s" has created an account on %s and awaits admin approbation', [$_['user'], $_['sitename']]);
echo "\n\n".$_['link'];