summaryrefslogtreecommitdiff
path: root/lib/Conf.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Conf.php')
-rw-r--r--lib/Conf.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/Conf.php b/lib/Conf.php
index 7c35baf..d333e42 100644
--- a/lib/Conf.php
+++ b/lib/Conf.php
@@ -106,10 +106,17 @@ class Conf {
// and we can try and iterate over it.
// First, try the most exotic.
- if (isset($_SESSION['user'])) {
- $domain_section_name = $_SESSION['user']->get_domain();
- if (isset($this->_conf[$domain_section_name][$key1])) {
- return $this->_conf[$domain_section_name][$key1];
+ if (isset($_SESSION['user']) && method_exists($_SESSION['user'], 'get_domain')) {
+ try {
+ $domain_section_name = $_SESSION['user']->get_domain();
+ if (isset($this->_conf[$domain_section_name][$key1])) {
+ return $this->_conf[$domain_section_name][$key1];
+ }
+ } catch (Exception $e) {
+ $domain_section_name = $this->get('kolab', 'primary_domain');
+ if (isset($this->_conf[$domain_section_name][$key1])) {
+ return $this->_conf[$domain_section_name][$key1];
+ }
}
}