lib/Auth lib/kolab_client_task.php
Aleksander Machniak
machniak at kolabsys.com
Tue Apr 3 11:19:06 CEST 2012
lib/Auth/LDAP.php | 25 +++++--------------------
lib/kolab_client_task.php | 6 ++++++
2 files changed, 11 insertions(+), 20 deletions(-)
New commits:
commit fa819a0cdfd1a96ca2553f7fa17b93a9e6b03edc
Author: Aleksander Machniak <machniak at kolabsys.com>
Date: Tue Apr 3 11:18:49 2012 +0200
Use unique_attribute() method
diff --git a/lib/Auth/LDAP.php b/lib/Auth/LDAP.php
index a7e785e..879683b 100644
--- a/lib/Auth/LDAP.php
+++ b/lib/Auth/LDAP.php
@@ -471,13 +471,8 @@ class LDAP
$type_str = $_key['key'];
}
*/
- $conf = Conf::get_instance();
-
- $unique_attr = $conf->get('unique_attribute');
- if (!$unique_attr) {
- $unique_attr = 'nsuniqueid';
- }
- $attributes[$unique_attr] = $user;
+ $unique_attr = $this->unique_attribute();
+ $attributes[$unique_attr] = $user;
// Now that values have been re-generated where necessary, compare
// the new group attributes to the original group attributes.
@@ -586,13 +581,8 @@ class LDAP
$type_str = $_key['key'];
}
*/
- $conf = Conf::get_instance();
-
// Group identifier
- $unique_attr = $conf->get('unique_attribute');
- if (!$unique_attr) {
- $unique_attr = 'nsuniqueid';
- }
+ $unique_attr = $this->unique_attribute();
$attributes[$unique_attr] = $group;
// Now that values have been re-generated where necessary, compare
@@ -904,14 +894,9 @@ class LDAP
return $subject;
}
- $conf = Conf::get_instance();
-
- $unique_attr = $conf->get('unique_attribute');
- if (!$unique_attr) {
- $unique_attr = 'nsuniqueid';
- }
+ $unique_attr = $this->unique_attribute();
+ $subject = $this->entry_find_by_attribute(array($unique_attr => $subject));
- $subject = $this->entry_find_by_attribute(array($unique_attr => $subject));
if (!empty($subject)) {
return key($subject);
}
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index b8f81d3..a2de5b3 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -36,6 +36,11 @@ class kolab_client_task
*/
protected $api;
+ /**
+ * @var Conf
+ */
+ protected $config;
+
protected $ajax_only = false;
protected $page_title = 'Kolab Admin Panel';
protected $menu = array();
@@ -378,6 +383,7 @@ class kolab_client_task
*/
public function config_get($name, $fallback = null)
{
+ // @TODO: remove this check
if ($name == "devel_mode")
return TRUE;
More information about the commits
mailing list