Changeset 702 for trunk/forum/includes/auth/auth_apache.php
- Timestamp:
- Mar 31, 2010, 6:32:40 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/forum/includes/auth/auth_apache.php
r400 r702 6 6 * 7 7 * @package login 8 * @version $Id : auth_apache.php 8602 2008-06-04 16:05:27Z naderman$8 * @version $Id$ 9 9 * @copyright (c) 2005 phpBB Group 10 10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License … … 105 105 ); 106 106 } 107 107 108 108 // Successful login... 109 109 return array( … … 218 218 'user_type' => USER_NORMAL, 219 219 'user_ip' => $user->ip, 220 'user_new' => ($config['new_member_post_limit']) ? 1 : 0, 220 221 ); 221 222 } … … 228 229 function validate_session_apache(&$user) 229 230 { 230 if (!isset($_SERVER['PHP_AUTH_USER'])) 231 { 232 return false; 233 } 234 235 $php_auth_user = ''; 236 set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true); 237 238 return ($php_auth_user === $user['username']) ? true : false; 231 // Check if PHP_AUTH_USER is set and handle this case 232 if (isset($_SERVER['PHP_AUTH_USER'])) 233 { 234 $php_auth_user = ''; 235 set_var($php_auth_user, $_SERVER['PHP_AUTH_USER'], 'string', true); 236 237 return ($php_auth_user === $user['username']) ? true : false; 238 } 239 240 // PHP_AUTH_USER is not set. A valid session is now determined by the user type (anonymous/bot or not) 241 if ($user['user_type'] == USER_IGNORE) 242 { 243 return true; 244 } 245 246 return false; 239 247 } 240 248
Note:
See TracChangeset
for help on using the changeset viewer.