Просмотр исходного кода

Set correct landing page when switching user context

Kristan Kenney 6 лет назад
Родитель
Сommit
ca1fbbcba2
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      web/login/index.php

+ 5 - 1
web/login/index.php

@@ -25,7 +25,11 @@ if (isset($_SESSION['user'])) {
             $_SESSION['look_alert'] = 'yes';
         }
     }
-    header("Location: /list/web/");
+    if ($_SESSION['user'] == 'admin' && empty($_GET['loginas'])) {
+        header("Location: /list/user/");
+    } else {
+        header("Location: /list/web/");
+    }
     exit;
 }