summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/kolab_api_controller.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/kolab_api_controller.php b/lib/kolab_api_controller.php
index a4a4b78..3c7ea84 100644
--- a/lib/kolab_api_controller.php
+++ b/lib/kolab_api_controller.php
@@ -410,11 +410,16 @@ class kolab_api_controller
*
* @param array $request GET request parameters
*
- * @return bool
+ * @return bool|array Domain attributes or False on failure
*/
- private function select_domain($request) {
+ private function select_domain($request)
+ {
if (!empty($request['domain']) && is_string($request['domain'])) {
- return $_SESSION['user']->set_domain($request['domain']);
+ if ($_SESSION['user']->set_domain($request['domain'])) {
+ $service = $this->get_service('domain');
+ $domain = $service->domain_info(array('domain' => $request['domain']), null);
+ return $domain;
+ }
}
return false;