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 2010/01/20 21:33:45 UTC
svn commit: r901368 -
/incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php
Author: jfthomps
Date: Wed Jan 20 20:33:44 2010
New Revision: 901368
URL: http://svn.apache.org/viewvc?rev=901368&view=rev
Log:
VCL-139
modified getLDAPUserData
-set first and last names to empty string if not returned by LDAP
-set emailnotices to 0 if email address not returned by LDAP
Modified:
incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php
Modified: incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php?rev=901368&r1=901367&r2=901368&view=diff
==============================================================================
--- incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php (original)
+++ incubator/vcl/trunk/web/.ht-inc/authmethods/ldapauth.php Wed Jan 20 20:33:44 2010
@@ -364,16 +364,23 @@
$data[strtolower($auth['lastname'])] = '';
}
}
+ $return['emailnotices'] = 1;
if(! array_key_exists($auth['email'], $data)) {
$data[strtolower($auth['email'])] = $userid . $auth['defaultemail'];
+ $return['emailnotices'] = 0;
}
- $return['first'] = mysql_escape_string($data[strtolower($auth['firstname'])]);
- $return['last'] = mysql_escape_string($data[strtolower($auth['lastname'])]);
+ if(array_key_exists(strtolower($auth['firstname']), $data))
+ $return['first'] = mysql_escape_string($data[strtolower($auth['firstname'])]);
+ else
+ $return['first'] = '';
+ if(array_key_exists(strtolower($auth['lastname']), $data))
+ $return['last'] = mysql_escape_string($data[strtolower($auth['lastname'])]);
+ else
+ $return['last'] = '';
if($donumericid && is_numeric($data[strtolower($auth['numericid'])]))
$return['numericid'] = $data[strtolower($auth['numericid'])];
$return['email'] = mysql_escape_string($data[strtolower($auth['email'])]);
- $return['emailnotices'] = 1;
return $return;
}