Loading...
 
Skip to main content

LDAP / Active directory


You are viewing a reply to How to get groups from LDAP/ADS [patch]

Re: How to get groups from LDAP/ADS [patch]




Thanks, Al, for this solution!

It's good enough as long as you can manage your groups/permissions according to groups you get from Active Directory. If you need groups in TikiWiki which don't map to AD groups you have a problem because on each login the user is taken out of all his/her groups.

I'd like to propose a solution.

Sorry, I don't know how to write a diff file so I'll just explain the changes; they're not complicated.

userslib.php - line 786
Copy to clipboard
//$groups = array("Registered");

i.e. comment out that line; it's not necessary because of the following change

userslib.php - line 1929
Copy to clipboard
// in case resetting group list, do not remove Registered or persistent groups with names beginning * $query = "delete from `users_usergroups` where `userId`=? and `groupName` != 'Registered' and `groupName` not like '*%'";

i.e. add the comment and add "`groupName` != 'Registered' and `groupName` not like '*%'" to the query

Once you have done this you can create groups with names starting with * and the users will never be removed automatically from those groups.

Hope this helps someone!