summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-03-22 15:41:58 +0100
committerAleksander Machniak <alec@alec.pl>2012-03-22 15:41:58 +0100
commita0b5e8facac7ae555556898b8d5956e99da3419f (patch)
tree1531311f9bb22f87088212e80a55b999dd742b14
parentcd8ba3a60e5dead35ea0e004e629a06f4858c56c (diff)
downloadwebadmin-a0b5e8facac7ae555556898b8d5956e99da3419f.tar.gz
Don't store user_types in session when working in devel_mode
-rw-r--r--lib/kolab_client_task.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 59d39f4..010e1ce 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -476,16 +476,18 @@ class kolab_client_task
*/
protected function user_types()
{
- if (!isset($_SESSION['user_types'])) {
- $result = $this->api->post('user_types.list');
- $list = $result->get('list');
+ if (isset($_SESSION['user_types'])) {
+ return $_SESSION['user_types'];
+ }
- if (is_array($list)) {
- $_SESSION['user_types'] = $list;
- }
+ $result = $this->api->post('user_types.list');
+ $list = $result->get('list');
+
+ if (is_array($list) && !$this->config_get('devel_mode')) {
+ $_SESSION['user_types'] = $list;
}
- return $_SESSION['user_types'];
+ return $list;
}
/**