Fix some template variables
parent
5274f306e3
commit
f87fa5d5bb
|
@ -38,11 +38,10 @@ class ManageUsers extends RequestHandler
|
||||||
$tpl = $this->app->template('users.php')->parent('__dashboard.php')->vars([
|
$tpl = $this->app->template('users.php')->parent('__dashboard.php')->vars([
|
||||||
'title' => 'Benutzer',
|
'title' => 'Benutzer',
|
||||||
'username' => $_SESSION['DISPLAYNAME']
|
'username' => $_SESSION['DISPLAYNAME']
|
||||||
])->unsafeVar('user-list', $table.'</tbody></table>')
|
])->unsafeVar('user-list', $table.'</tbody></table>');
|
||||||
->unsafeVar('users-message', isset($_SESSION['users-message']) ? $_SESSION['users-message'] : '');
|
|
||||||
|
|
||||||
if (isset($_SESSION['users-message'])) {
|
if (isset($_SESSION['users-message'])) {
|
||||||
$tpl->unsafeVar('users-message', $_SESSION['users-message']);
|
$tpl->unsafeVar('message', $_SESSION['users-message']);
|
||||||
unset($_SESSION['users-message']);
|
unset($_SESSION['users-message']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ class ResetPassword extends \Mcp\RequestHandler
|
||||||
'title' => 'Passwort geändert',
|
'title' => 'Passwort geändert',
|
||||||
'preheader' => 'Das Passwort für deinen 4Creative-Account wurde soeben zurückgesetzt'
|
'preheader' => 'Das Passwort für deinen 4Creative-Account wurde soeben zurückgesetzt'
|
||||||
])->unsafeVar('message', str_replace('%%NAME%%', $name, $this::MESSAGE));
|
])->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');
|
header('Location: index.php?page=login');
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ class ResetPassword extends \Mcp\RequestHandler
|
||||||
{
|
{
|
||||||
$this->app->template('error.php')->parent('__presession.php')->vars([
|
$this->app->template('error.php')->parent('__presession.php')->vars([
|
||||||
'title' => 'Fehler',
|
'title' => 'Fehler',
|
||||||
'message' => $message
|
'error-message' => $message
|
||||||
])->render();
|
])->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue