فهرست منبع

Set correct landing page when switching user context

Kristan Kenney 6 سال پیش
والد
کامیت
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';
             $_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;
     exit;
 }
 }