0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

fix forget-password (+ themeing), see #427

This commit is contained in:
David Goodwin 2021-01-19 09:19:30 +00:00
parent 94836ed156
commit 95b431599d

View File

@ -1,4 +1,5 @@
<?php
/**
* Postfix Admin
*
@ -25,7 +26,6 @@
*/
$smarty = PFASmarty::getInstance();
/* if in .../users, we need to load a different common.php; not this file is symlinked with public/ */
if (preg_match('/\/users\//', $_SERVER['REQUEST_URI'])) {
@ -35,8 +35,11 @@ if (preg_match('/\/users\//', $_SERVER['REQUEST_URI'])) {
$rel_path = './';
$context = 'admin';
}
require_once($rel_path . 'common.php');
$smarty = PFASmarty::getInstance();
$smarty->configureTheme($rel_path);
if ($context === 'admin' && !Config::read('forgotten_admin_password_reset') ||
$context === 'users' && (!Config::read('forgotten_user_password_reset') || Config::read('mailbox_postpassword_script'))) {