|
From: <axe...@us...> - 2010-07-27 11:30:02
|
Revision: 116
http://wpmu-ldap.svn.sourceforge.net/wpmu-ldap/?rev=116&view=rev
Author: axelseaa
Date: 2010-07-27 11:29:56 +0000 (Tue, 27 Jul 2010)
Log Message:
-----------
patched SSO and fixed registration include issue
Modified Paths:
--------------
trunk/ldap/lib/wpmu_ldap.functions.php
trunk/ldap_auth.php
Modified: trunk/ldap/lib/wpmu_ldap.functions.php
===================================================================
--- trunk/ldap/lib/wpmu_ldap.functions.php 2010-06-21 02:36:08 UTC (rev 115)
+++ trunk/ldap/lib/wpmu_ldap.functions.php 2010-07-27 11:29:56 UTC (rev 116)
@@ -91,7 +91,7 @@
function wpmuLdapAuthenticate($ldapString, $loginUserName, $loginPassword) {
$errors = new WP_Error;
// Check that user is not flagged as a ldap account
- require ( ABSPATH . WPINC . '/registration.php' );
+ require_once ( ABSPATH . WPINC . '/registration.php' );
if ( username_exists($loginUserName) ) {
$loginObj = get_userdatabylogin($loginUserName);
$ldapMeta = get_usermeta($loginObj->ID,'ldap_login');
@@ -408,3 +408,10 @@
return $username;
}
+
+/*
+when in SSO mode we don.t need to forse a relog in so theis stops that
+*/
+function wpmuLdapSSODisableReauth($login_url){
+ return str_replace('&reauth=1','',$login_url);
+}
Modified: trunk/ldap_auth.php
===================================================================
--- trunk/ldap_auth.php 2010-06-21 02:36:08 UTC (rev 115)
+++ trunk/ldap_auth.php 2010-07-27 11:29:56 UTC (rev 116)
@@ -51,7 +51,10 @@
// Authentication filters
add_action('authenticate', 'wpmuLdapUsernamePasswordAuthenticate', 25, 3);
add_filter('wp_authenticate_user', 'wpmuLdapCheckLdapMeta'); //disabled local login if ldap meta flag is set
- if (get_site_option('ldapSSOEnabled')) add_action('authenticate', 'wpmuLdapSSOAuthenticate', 40, 3);
+ if (get_site_option('ldapSSOEnabled')) {
+ add_action('authenticate', 'wpmuLdapSSOAuthenticate', 40, 3);
+ add_filter('login_url', 'wpmuLdapSSODisableReauth'); //removes reauth from login URL
+ }
// disable only for ldap accounts
add_filter('show_password_fields', 'wpmuLdapDisableLdapPassword');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|