check for existance of SESSION.domain before clearing

This commit is contained in:
Matthew Saunders Brown 2023-08-21 16:16:04 -07:00
parent 418eef04d4
commit 2637feee5f

View File

@ -23,7 +23,9 @@ $f3->set('NAV.hostname', trim(`/bin/hostname -f`));
/* configurations based on hostname */
if ($f3->get('HOST') == $f3->get('NAV.hostname')) {
$mapping = 'vpanel';
$f3->clear('SESSION.domain');
if ($f3->exists('SESSION.domain')) {
$f3->clear('SESSION.domain');
}
} elseif (preg_match('/^mail\./i', $f3->get('HOST'))) {
$mapping = 'vmail';
$domain = preg_replace('/^mail\./i', '', $f3->get('HOST'));