[MOD] LDAP Integration

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-23-2007, 10:38 PM
New Pligger
 
Join Date: Jul 2007
Posts: 2
Greetings all,

I've whipped up an LDAP integration module.
It's entirely based on the WikiMedia LDAP plugin and all I've done is modify a few bits to work with Pligg. See here for more details

Basically it validates the user against the LDAP and then if the user exists in the Pligg DB it will update the details with the latest password & email address.
If not it will create a new user.

Pligg will then continue on it's normal login procedure and validate the details against the newly created/edited user.

This method provided minimal disruption to the core Pligg code.

The code snippet below needs to be added to the Authenticate function in
/libs/login.php to add a new hook for Pligg to use on authentication.

Quote:
function Authenticate($username, $pass, $remember=false, $already_salted_pass='') {
global $db;
$dbusername=$db->escape($username);

$authArray = array("username" => $dbusername,
"password" => $pass,
"remember" => $remember,
"salted_pass" => $already_salted_pass);

check_actions('user_authentication', $authArray );

$user=$db->get_row("SELECT user_id, user_pass, user_login FROM " . table_users . " WHERE user_login = '$dbusername'");
The attached zip contains the module. Just plug it in as normal.

I have configured and tested it in my environment only. It may or may not support all of the functionality provided by the wikimedia plugin. I do not plan on making any improvements to this module as I am setting things up for a short term test environment.
Attached Files
File Type: zip ldap.zip (12.3 KB, 215 views)
Reply With Quote
  #2 (permalink)  
Old 07-23-2007, 10:44 PM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
Great work and thanks for sharing, will try and report in here.
Reply With Quote
  #3 (permalink)  
Old 09-10-2007, 01:33 AM
New Pligger
 
Join Date: Aug 2007
Posts: 22
after install this module and edit the login.php and also the ldap.dll enable . am i need set the ldap_seeting.php ?
i am not sure about the LDAP server name ? who should i check in my company? network admin?
Reply With Quote
  #4 (permalink)  
Old 11-01-2007, 09:21 AM
New Pligger
Pligg Version: ?
Pligg Template: ?
 
Join Date: Oct 2007
Posts: 1
Good work on adapting this mod. Thanks!
Reply With Quote
  #5 (permalink)  
Old 03-24-2008, 02:47 PM
New Pligger
 
Join Date: Mar 2008
Posts: 2
My LDAP server does not use any TLS or SSL, so I setup ldap_settings.php as:

$LDAPEncryptionType = array("myhost" => "clear");

However, when I try to login as a user, I receive:

Warning: ldap_start_tls() [function.ldap-start-tls]: Unable to start TLS: Can't contact LDAP server in /var/www/pligg/modules/ldap/ldap_main.php on line 166

What am I missing?
Reply With Quote
  #6 (permalink)  
Old 03-24-2008, 03:20 PM
New Pligger
 
Join Date: Mar 2008
Posts: 2
Found my issue, in ldap_main.php, you need to specify your domain:

$_SESSION["LDAPDomain"] = "myhost";
Reply With Quote
  #7 (permalink)  
Old 05-12-2008, 11:10 PM
New Pligger
 
Join Date: May 2008
Posts: 4
Hello,

I have the LDAP integration working however the user's 'email' address/attribute is not being written to the local pligg database.

Does anyone have some expertise with this module?

Last edited by jalemathai; 05-13-2008 at 01:39 AM.
Reply With Quote
  #8 (permalink)  
Old 03-16-2009, 04:33 PM
New Pligger
 
Join Date: Jan 2009
Posts: 7
Does anyone have this working with RC2? It shows up at the top of the modules list for me outside of the table structure without an install link. Worked fine in the old beta.

Thanks!
Reply With Quote
  #9 (permalink)  
Old 03-20-2009, 09:02 AM
New Pligger
 
Join Date: Jan 2009
Posts: 1
We're upgrading from 9.9.0 to RC2, and weren't able to get the module working either. I saw the same results; it shows up at the top of the module list, without an 'install' link.

Was anyone able to get it working with RC1?
Reply With Quote
  #10 (permalink)  
Old 04-29-2009, 02:31 PM
New Pligger
 
Join Date: Jan 2009
Posts: 7
Credit the pligg developers with this fix: this module needed a ldap_readme.htm file. Thanks guys!

Just create a file with that name in the modules/ldap directory and you'll be able to install it.

Unfortunately, I still can't get it to work like it does in the earlier betas. If anyone else has any luck wih this, please let us know.

Thanks.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg User Integration Options Yankidank Wiki Articles 1 08-11-2009 01:12 AM
PHPBB Integration with Pligg Yankidank Questions and Comments 64 06-07-2008 06:54 AM
LDAP integration guidance kartiksubbarao Questions and Comments 3 05-28-2008 11:58 AM
Ldap ? skelley Questions and Comments 3 09-10-2007 04:35 AM
The importance of achieving vBulletin integration BobdeBilder Questions and Comments 4 07-14-2007 09:05 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development