LDAP module tuning and help needed

Pitons

Joined: 2011-04-20
Posts: 1
Posted: Wed, 2011-04-20 10:40

Hi there everybody!

First of all - bowl to creators of gallery and my best wishes on continuing this superb product

So...
I'm trying to get it to work with LDAP module
Recently had a success in getting registered/everybody groups working as they should.
installed newest gallery and ldap module from git
changed ldap/config/identity.php and got successful connection, but at first couldn't get simple users to log in
Got "dang page"
started to "dig"
found that ldap/libraries/drivers/IdentityProvider/Ldap.php needs some tuning:
*Of course it depends on your LDAP configuration/structure.
-first:
to show users full name when you log on:
Line 135 return $this->ldap_entry["displayname"][0]; -> return $this->ldap_entry["cn"][0];

-second to get logging in and group mapping to work:
by default it searches nember of the group (memberUID) by "name"
SRCH base="ou=Groups,ou=Accounts,dc=domain,dc=lan" scope=2 deref=0 filter="(?member=)"
but member records are full DN so change:

Line 196 "(memberUID=$user->name)"); -> "(member=$user->dn)");

and U get succesfull group finds:
SRCH base="ou=Groups,ou=Accounts,dc=itsec,dc=lan" scope=2 deref=0 filter="(member=cn=test two,ou=users,ou=accounts,dc=domain,dc=lan)"

BUT could somebody help with:
- user_profile/show/[$uidNumber] - it gets users uidNumber from LDAP and shows blank page
- private user galleries (can create separate group for every user - but it's too annoying)

any comments/questions will be gladly replayed
Good day!