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

Set correct landing page depending on admin/standard user

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

+ 5 - 1
web/login/index.php

@@ -128,7 +128,11 @@ if (isset($_POST['user']) && isset($_POST['password'])) {
                         unset($_SESSION['request_uri']);
                         exit;
                     } else {
-                        header("Location: /list/web/");
+                        if ($v_user == 'admin') {
+                            header("Location: /list/user/");
+                        } else {
+                            header("Location: /list/web/");
+                        }
                         exit;
                     }
                 }