Skip to content

cccraig/ldap_login

 
 

Repository files navigation

I'm no longer an employee at a University (woot) but this means I don't have access to an ldap sandbox to do robust testing.

Hi-di-ho good reader!

I'm an employee at a University who was tasked with finding a free photo platform for hosting our own photos/videos. I discovered Piwigo, decided it was awesome, and got a demo version up and running. However, it is absolutely critical for our organization that we be able to bounce login requests off LDAP. Finding this original plugin was no longer maintained, and that the other forks did not seem to be working, I forked the original and got it working.

*Disclaimer, it works on my machine :-)
 Linux Mint 18.1 (Ubuntu 16.04.1)
 PHP 7.0
 MySQL 5.7.19
 Apache/2.4.18

Most of the original template code is still the same, but has some very small style changes. The big edit that I made was using a very full featured ldap class to extend the main Piwigo ldap class (class.ldap.php). This helped a lot. Secondly, I wanted to be able to map ldap users to specific groups in Piwigo. To do this you enter a comma separated list of ldap groups in one input, and a matching comma separated list of Piwigo groups in another input. The Piwigo groups are then mapped (by ID) to the named ldap group and compared on login. The user will be removed from a group if they are no longer listed in the corresponding ldap group. To help with choosing groups, I included a feature to query ldap for the groups a specific user belongs to. I also removed some of the email options in the template, although they are still there in the control code. Checks for them need to be implemented in the login area.

If you have issues authenticating users please let me know and I will try to help.

WARNING!
I have changed the name from Ldap_Login to simply LdapLogin (no underscore). This will not hurt anything but you will need to change the plugin name in the Piwigo plugins table.

About

Plugin for Piwigo LDAP login

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 96.3%
  • Smarty 3.7%