X-Git-Url: http://git.rot13.org/?p=virtual-ldap;a=blobdiff_plain;f=sql%2Fgroup.sql;h=b862457e09e87b5130aeda3aed1053c6edd3b25e;hp=e98e8f44fb56f7d763640848cbf7924459366dd5;hb=c004207348f0a98a6ed47d255eb20eae213c524f;hpb=81326d819a2f6c6fdd076087f54fb82c3a44739e diff --git a/sql/group.sql b/sql/group.sql index e98e8f4..b862457 100644 --- a/sql/group.sql +++ b/sql/group.sql @@ -1,11 +1,11 @@ select - concat('cn=',c.categorycode,',ou=',c.categorycode) as dn, + concat('cn=',c.categorycode,',ou=',c.categorycode,',dc=ffzg,dc=hr') as dn, 'group' as objectClass, - 'groups' as ou, + c.categorycode as ou, c.categorycode as cn, description as description, concat('uid=',replace(userid,'@ffzg.hr',''),',ou=',c.categorycode,',dc=ffzg,dc=hr') as members from categories c join borrowers b on b.categorycode = c.categorycode -where length(userid) > 0 +where length(userid) > 0 and userid not like '%@expired'