accounting modules
This commit is contained in:
@@ -124,6 +124,7 @@ $_SESSION["login_name"] = $temp["name"];
|
||||
$_SESSION["login_surname"] = $temp["surname"];
|
||||
$_SESSION["login_company_id"] = $temp["default_company"];
|
||||
$_SESSION["login_profile_picture"] = $temp["profile_picture"] ?? '';
|
||||
$_SESSION["login_app_access"] = $temp["app_access"] ?? 'wms';
|
||||
|
||||
$role_sth = $pdo1->prepare(
|
||||
"SELECT role FROM company_map_user
|
||||
|
||||
+5
-2
@@ -2,9 +2,12 @@
|
||||
require '../session.php';
|
||||
require '../config.php';
|
||||
require '../include_header.php';
|
||||
// successful login
|
||||
// successful login — redirect based on app_access
|
||||
if(!empty($_SESSION["login_status"])){
|
||||
header('Location: '.$server_url.'dashboard/index.php');
|
||||
$redirect = ($_SESSION['login_app_access'] ?? 'wms') === 'accounting'
|
||||
? $server_url . 'ac_dashboard/index.php'
|
||||
: $server_url . 'dashboard/index.php';
|
||||
header('Location: ' . $redirect);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user