Loading...
 
Skip to main content

LDAP Group Synchronisation broken

Status
Closed
Subject
LDAP Group Synchronisation broken
Version
7.x
8.x
Category
  • Error
Feature
External Authentication (LDAP, AD, PAM, CAS, etc)
Permission
User Administration (Registration, Login & Banning)
Resolution status
Out of Date
Submitted by
Manuel Schneider
Volunteered to solve
Florian Gleixner
Lastmod by
Ushindi Gedeon
Rating
(0)
Description

With revision 31581 the LDAP group synchronisation has been limited to only happen 60 seconds after the login:

http://tikiwiki.svn.sourceforge.net/viewvc/tikiwiki/trunk/lib/userslib.php?r1=31565&r2=31581&pathrev=31581Question

So far as I can see this method is only called during the LDAP login procedure, so the if-statement in line 1415 will always be false, thus no synchronisation will happen.

I checked this problem with 7.1, 7.2 and 8.3 and never succeded to get the groups from an AD although the LDAP login worked. After disseminating the code and removing this if-statement the feature works again.

I wonder what the the use of this if-statement was? The commit message refers to webdav changes - how does it affect this?
Can this statement be removed so LDAP group synchronisation works or is there another way to fix this?

Solution
libs/userslib.php
Copy to clipboard
1412c1414 - if ( $tikilib->now - $current >= 60 && ( $prefs['syncGroupsWithDirectory'] == 'y' || $prefs['syncUsersWithDirectory'] == 'y' ) ) { - $ret &= $this->ldap_sync_user_and_groups($user, $pass); - } + $ret &= $this->ldap_sync_user_and_groups($user, $pass);
Workaround
Importance
8
Easy to solve?
9
Priority
72
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
4147
Created
Monday 30 January, 2012 15:25:17 UTC
by Manuel Schneider
LastModif
Friday 03 July, 2026 14:32:10 UTC


Show PHP error messages