1
0
Fork 0

Fix some template variables

master
Anonymous Contributor 2023-09-09 06:30:42 +02:00
parent 5274f306e3
commit f87fa5d5bb
2 changed files with 4 additions and 5 deletions

View File

@ -38,11 +38,10 @@ class ManageUsers extends RequestHandler
$tpl = $this->app->template('users.php')->parent('__dashboard.php')->vars([
'title' => 'Benutzer',
'username' => $_SESSION['DISPLAYNAME']
])->unsafeVar('user-list', $table.'</tbody></table>')
->unsafeVar('users-message', isset($_SESSION['users-message']) ? $_SESSION['users-message'] : '');
])->unsafeVar('user-list', $table.'</tbody></table>');
if (isset($_SESSION['users-message'])) {
$tpl->unsafeVar('users-message', $_SESSION['users-message']);
$tpl->unsafeVar('message', $_SESSION['users-message']);
unset($_SESSION['users-message']);
}

View File

@ -81,7 +81,7 @@ class ResetPassword extends \Mcp\RequestHandler
'title' => 'Passwort geändert',
'preheader' => 'Das Passwort für deinen 4Creative-Account wurde soeben zurückgesetzt'
])->unsafeVar('message', str_replace('%%NAME%%', $name, $this::MESSAGE));
(new SmtpClient($smtp['host'], $smtp['port'], $smtp['address'], $smtp['password']))->sendHtml($smtp['address'], $smtp['name'], $res['Email'], 'Passwort für '.$name.' zurückgesetzt', $tplMail);
(new SmtpClient($smtp['host'], intval($smtp['port']), $smtp['address'], $smtp['password']))->sendHtml($smtp['address'], $smtp['name'], $res['Email'], 'Passwort für '.$name.' zurückgesetzt', $tplMail);
header('Location: index.php?page=login');
}
@ -91,7 +91,7 @@ class ResetPassword extends \Mcp\RequestHandler
{
$this->app->template('error.php')->parent('__presession.php')->vars([
'title' => 'Fehler',
'message' => $message
'error-message' => $message
])->render();
}