FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » LDAP Plugin Enhancements (Updated!)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
LDAP Plugin Enhancements (Updated!) [message #166921] Wed, 28 March 2012 13:13 Go to previous message
Multitool is currently offline  Multitool   United Kingdom
Messages: 47
Registered: February 2012
Karma:
Member
Hi all,

OK, updates to this as follows.

I'm not the world's greatest programmer, and I know next to nothing about PHP, but this seems to work for my application. Comments and criticisms would be gratefully received!

Summary of changes:

• Changed to use LDAP URLs instead of servername/port. This allows use of LDAPS (LDAP over SSL).
• Allow forum user details (email address, real name, alias) to be set from attributes retrieved from LDAP server.
• Always update email/name/alias with current info from LDAP server at each login (if enabled).
• If the user doesn't already exist, check whether an existing user has the same email address (as retrieved from LDAP) as the user trying to log in. If an existing user with the same email address is present, change the login of that user to the login of the user logging in, and update the name/alias with details from the LDAP server. (This should ensure that posts imported from NNTP are assigned to the correct user, even if that user has never logged in to the forum before, and also avoids duplicate email address problems.)

(I also reinstated the password synchronisation, as this seems to be required for reasons I don't understand.)

As mentioned above, it's probably not the most efficient piece of code ever written, but it seems to work for me Smile

Hope it's useful to others.


[Updated on: Thu, 29 March 2012 19:49]

Report message to a moderator

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fudforum debugging output >>File
Next Topic: Adding References: header to mailing list emails
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Mar 28 09:27:04 GMT 2024

Total time taken to generate the page: 0.05267 seconds