diff --git a/plugins/kolab_auth/kolab_auth.php b/plugins/kolab_auth/kolab_auth.php
index 07800cda..691f5422 100644
--- a/plugins/kolab_auth/kolab_auth.php
+++ b/plugins/kolab_auth/kolab_auth.php
@@ -346,6 +346,9 @@ class kolab_auth extends rcube_plugin
// Set credentials
if ($record) {
+ // Store UID in session for use by other plugins
+ $_SESSION['kolab_uid'] = is_array($record['uid']) ? $record['uid'][0] : $record['uid'];
+
if ($login_attr)
$this->data['user_login'] = is_array($record[$login_attr]) ? $record[$login_attr][0] : $record[$login_attr];
if ($alias_attr)
@@ -405,8 +408,9 @@ class kolab_auth extends rcube_plugin
*/
private function init_ldap()
{
- if ($this->ldap)
+ if ($this->ldap) {
return $this->ldap->ready;
+ }
$rcmail = rcmail::get_instance();
@@ -447,8 +451,9 @@ class kolab_auth extends rcube_plugin
$this->ldap->set_filter($filter);
$results = $this->ldap->list_records();
- if (count($results->records) == 1)
+ if (count($results->records) == 1) {
return $results->records[0];
+ }
}
/**
@@ -480,9 +485,16 @@ class kolab_auth extends rcube_plugin
*/
class kolab_auth_ldap_backend extends rcube_ldap
{
+ function __construct($p, $debug=false, $mail_domain=null)
+ {
+ parent::__construct($p, $debug, $mail_domain);
+ $this->fieldmap['uid'] = 'uid';
+ }
+
function set_filter($filter)
{
- if ($filter)
+ if ($filter) {
$this->prop['filter'] = $filter;
+ }
}
}
diff --git a/plugins/kolab_auth/package.xml b/plugins/kolab_auth/package.xml
index 4c9b8ad9..937798d9 100644
--- a/plugins/kolab_auth/package.xml
+++ b/plugins/kolab_auth/package.xml
@@ -18,9 +18,9 @@
machniak@kolabsys.com
yes
- 2011-11-01
+ 2012-02-29
- 0.1
+ 0.2
0.1
@@ -38,6 +38,8 @@
+
+