You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2012/05/16 19:49:11 UTC

svn commit: r1339283 - /incubator/vcl/trunk/web/.ht-inc/authentication.php

Author: jfthomps
Date: Wed May 16 17:49:10 2012
New Revision: 1339283

URL: http://svn.apache.org/viewvc?rev=1339283&view=rev
Log:
VCL-576
Finalizing for 2.3 release

authentication.php: modified ldapLogin - somehow the part that checks for lookupuserbeforeauth was commented out; uncommented and added checks for lookupuserbeforeauth and lookupuserfield existing before running block of code

Modified:
    incubator/vcl/trunk/web/.ht-inc/authentication.php

Modified: incubator/vcl/trunk/web/.ht-inc/authentication.php
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/authentication.php?rev=1339283&r1=1339282&r2=1339283&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/authentication.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/authentication.php Wed May 16 17:49:10 2012
@@ -374,7 +374,9 @@ function ldapLogin($authtype, $userid, $
 	}
 	ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3);
 	ldap_set_option($ds, LDAP_OPT_REFERRALS, 0);
-	/*if($authMechs[$authtype]['lookupuserbeforeauth']) {
+	if(array_key_exists('lookupuserbeforeauth', $authMechs[$authtype]) &&
+		$authMechs[$authtype]['lookupuserbeforeauth'] &&
+	   array_key_exists('lookupuserfield', $authMechs[$authtype])) {
 		# in this case, we have to look up what part of the tree the user is in
 		#   before we can actually look up the user
 		$auth = $authMechs[$authtype];
@@ -406,7 +408,7 @@ function ldapLogin($authtype, $userid, $
 			return;
 		}
 	}
-	else*/
+	else
 		$ldapuser = sprintf($authMechs[$authtype]['userid'], $userid);
 	$res = ldap_bind($ds, $ldapuser, $passwd);
 	if(! $res) {