$usip = $_SERVER['REMOTE_ADDR']; $intime = date("Y/m/d H:i:s"); require_once 'modules/Users/LoginHistory.php'; $loghistory = new LoginHistory(); $Signin = $loghistory->user_login($focus->column_fields["user_name"], $usip, $intime); //Security related entries start require_once 'include/utils/UserInfoUtil.php'; createUserPrivilegesfile($focus->id); //Security related entries end unset($_SESSION['login_password']); unset($_SESSION['login_error']); unset($_SESSION['login_user_name']); $_SESSION['authenticated_user_id'] = $focus->id; $_SESSION['app_unique_key'] = $application_unique_key; //Enabled session variable for KCFINDER coreBOS_Session::setKCFinderVariables(); // store the user's theme in the session if (!empty($focus->column_fields["theme"])) { $authenticated_user_theme = $focus->column_fields["theme"]; } else { $authenticated_user_theme = $default_theme; } // store the user's language in the session if (!empty($focus->column_fields["language"])) { $authenticated_user_language = $focus->column_fields["language"]; } else { $authenticated_user_language = $default_language; } $_SESSION['vtiger_authenticated_user_theme'] = $authenticated_user_theme; $_SESSION['authenticated_user_language'] = $authenticated_user_language; $log->debug("authenticated_user_theme is {$authenticated_user_theme}");