save last selected server profile
This commit is contained in:
parent
d38e91e9f1
commit
fe3778a0ec
|
@ -1,3 +1,7 @@
|
|||
August 2008 2.4.0
|
||||
- save last selected server profile from login page
|
||||
|
||||
|
||||
30.04.2008 2.3.0
|
||||
- added Polish translation
|
||||
- support phpGroupWare accounts
|
||||
|
|
|
@ -115,6 +115,11 @@ include_once("../lib/config.inc"); // Include config.inc which provides Config c
|
|||
session_save_path("../sess"); // Set session save path
|
||||
session_start(); // Start LDAP Account Manager session
|
||||
|
||||
// save last selected login profile
|
||||
if(isset($_POST['profile'])) {
|
||||
setcookie("lam_default_profile", $_POST['profile'], time() + 365*60*60*24);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the login window.
|
||||
*
|
||||
|
@ -458,6 +463,9 @@ elseif(!empty($_POST['profileChange'])) {
|
|||
else {
|
||||
$default_Config = new LAMCfgMain();
|
||||
$default_Profile = $default_Config->default;
|
||||
if(isset($_COOKIE["lam_default_profile"])) {
|
||||
$default_Profile = $_COOKIE["lam_default_profile"];
|
||||
}
|
||||
$_SESSION["config"] = new LAMConfig($default_Profile); // Create new Config object
|
||||
$_SESSION["cfgMain"] = $default_Config; // Create new CfgMain object
|
||||
|
||||
|
|
Loading…
Reference in New Issue