summaryrefslogtreecommitdiff
path: root/lib/kolab_api_service.php
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-03-27 08:49:05 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-03-27 08:49:05 (GMT)
commitc28a93980330f0f2bce80e131100f5f5d676032b (patch)
treebfe72428e4a394430ff2331dfda0be62136acb06 /lib/kolab_api_service.php
parent3d20d78200830449c97b7be6085dbd14882612bc (diff)
downloadkolab-wap-c28a93980330f0f2bce80e131100f5f5d676032b.tar.gz
Set 'userid' to unique attribute value in system.authenticate response, cs fixes
Diffstat (limited to 'lib/kolab_api_service.php')
-rw-r--r--lib/kolab_api_service.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/kolab_api_service.php b/lib/kolab_api_service.php
index 752c243..7b4ba62 100644
--- a/lib/kolab_api_service.php
+++ b/lib/kolab_api_service.php
@@ -371,7 +371,7 @@ abstract class kolab_api_service
// unique attribute is always allowed
if (($key = array_search('id', $post['attributes'])) !== false) {
- $attributes[] = $this->unique_attribute();
+ $attributes[] = self::unique_attribute();
}
}
@@ -385,7 +385,7 @@ abstract class kolab_api_service
protected function parse_list_result($result)
{
if (!empty($result) && !empty($result['count'])) {
- $unique_attr = $this->unique_attribute();
+ $unique_attr = self::unique_attribute();
// replace back unique attribute name with 'id'
foreach ($result['list'] as $idx => $record) {
@@ -473,7 +473,7 @@ abstract class kolab_api_service
$attrs = $attrs[$dn];
$extra_attrs = array();
$type_id = $this->object_type_id($object_name, $attrs);
- $unique_attr = $this->unique_attribute();
+ $unique_attr = self::unique_attribute();
// Search for attributes associated with the type_id that are not part
// of the result returned earlier. Example: nsrole / nsroledn / aci, etc.
@@ -561,7 +561,7 @@ abstract class kolab_api_service
*
* @return string Unique attribute name
*/
- protected function unique_attribute()
+ public static function unique_attribute()
{
$conf = Conf::get_instance();
$unique_attr = $conf->get('unique_attribute');
@@ -586,7 +586,7 @@ abstract class kolab_api_service
return $this->cache['unique_attributes'][$dn];
}
- $unique_attr = $this->unique_attribute();
+ $unique_attr = self::unique_attribute();
$auth = Auth::get_instance();
$result = $auth->get_entry_attribute($dn, $unique_attr);