Go Back   Pligg Forum > Pligg Development > Pligg Mods
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-23-2007, 09:38 PM
dwithnall dwithnall is offline
New Pligger
 
Join Date: Jul 2007
Posts: 2
Downloads: 1
Uploads: 0
Thanks: 0
Thanked 3 Times in 1 Post
[MOD] LDAP Integration

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, 88 views - Who Downloaded?)
Reply With Quote
The Following 3 Users Say Thank You to dwithnall For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 07-23-2007, 09:44 PM
dollars5's Avatar
dollars5 dollars5 is offline
Pligg is my love :)
 
Join Date: Dec 2006
Location: India
Posts: 2,160
Downloads: 29
Uploads: 1
Thanks: 292
Thanked 265 Times in 177 Posts
Great work and thanks for sharing, will try and report in here.
Reply With Quote
  #3 (permalink)  
Old 09-10-2007, 12:33 AM
nspuum nspuum is offline
New Pligger
 
Join Date: Aug 2007
Posts: 22
Downloads: 3
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
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, 08:21 AM
captmega captmega is offline
New Pligger
Pligg Version: ?
Pligg Template: ?
 
Join Date: Oct 2007
Posts: 1
Downloads: 1
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
Good work on adapting this mod. Thanks!
Reply With Quote
  #5 (permalink)  
Old 03-24-2008, 01:47 PM
sems sems is offline
New Pligger
 
Join Date: Mar 2008
Posts: 2
Downloads: 1
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
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, 02:20 PM
sems sems is offline
New Pligger
 
Join Date: Mar 2008
Posts: 2
Downloads: 1
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
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, 10:10 PM
jalemathai jalemathai is offline
New Pligger
 
Join Date: May 2008
Posts: 4
Downloads: 7
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
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 12:39 AM.
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
PHPBB Integration with Pligg Yankidank Drawing Board 64 06-07-2008 05:54 AM
LDAP integration guidance kartiksubbarao Core Development 3 05-28-2008 10:58 AM
Pligg integration with SMF Forum autoinc Pligg Mods 64 05-19-2008 01:22 AM
Flasm mp3/flv player integration bgg Suggestions 1 03-06-2008 04:55 AM
Ldap ? skelley General Help 3 09-10-2007 03:35 AM


LinkBacks Enabled by vBSEO 3.0.0