1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 11:45:56 +00:00

center and rework some utility screens

This commit is contained in:
Andrew Dolgov
2019-02-19 14:59:29 +03:00
parent 4f720f906e
commit c11f32ac38
18 changed files with 390 additions and 592 deletions

View File

@@ -283,35 +283,35 @@ class Pref_Users extends Handler_Protected {
$sth->execute([$pwd_hash, $new_salt, $uid]);
if ($show_password) {
print T_sprintf("Changed password of user %s to %s", $login, $tmp_user_pwd);
print_notice(T_sprintf("Changed password of user %s to %s", $login, $tmp_user_pwd));
} else {
print_notice(T_sprintf("Sending new password of user %s to %s", $login, $email));
}
if ($email) {
require_once "lib/MiniTemplator.class.php";
if ($email) {
require_once "lib/MiniTemplator.class.php";
$tpl = new MiniTemplator;
$tpl = new MiniTemplator;
$tpl->readTemplateFromFile("templates/resetpass_template.txt");
$tpl->readTemplateFromFile("templates/resetpass_template.txt");
$tpl->setVariable('LOGIN', $login);
$tpl->setVariable('NEWPASS', $tmp_user_pwd);
$tpl->setVariable('LOGIN', $login);
$tpl->setVariable('NEWPASS', $tmp_user_pwd);
$tpl->addBlock('message');
$tpl->addBlock('message');
$message = "";
$message = "";
$tpl->generateOutputToString($message);
$tpl->generateOutputToString($message);
$mailer = new Mailer();
$mailer = new Mailer();
$rc = $mailer->mail(["to_name" => $login,
"to_address" => $email,
"subject" => __("[tt-rss] Password change notification"),
"message" => $message]);
$rc = $mailer->mail(["to_name" => $login,
"to_address" => $email,
"subject" => __("[tt-rss] Password change notification"),
"message" => $message]);
if (!$rc) print_error($mailer->error());
if (!$rc) print_error($mailer->error());
}
}
}