From 5ced49e99001f8c8da6af6b6435a1056b6bf261c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Tue, 27 Feb 2007 04:29:25 +0000 Subject: [PATCH] r1426: When using USE_DEFAULT_AUTH_METHOD, we don't actually want to change the value in $bugsys->options[] because that means we can't see what the current value of the setting is --- includes/init.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/includes/init.php b/includes/init.php index 82b6a47..e61a4e4 100755 --- a/includes/init.php +++ b/includes/init.php @@ -102,13 +102,10 @@ $bugsys->setAppVersion($bugsys->options['trackerversion']); // ################################################################### // load userinfo -if (defined('USE_DEFAULT_AUTH_METHOD') AND constant('USE_DEFAULT_AUTH_METHOD') == 1) -{ - $bugsys->options['authmethod'] = 'default'; -} -require_once('./includes/auth/auth_' . $bugsys->options['authmethod'] . '.php'); +$authMethod = ((defined('USE_DEFAULT_AUTH_METHOD') AND constant('USE_DEFAULT_AUTH_METHOD') == 1) ? 'default' : $bugsys->options['authmethod']); +require_once('./includes/auth/auth_' . $authMethod . '.php'); -$authClass = 'Authentication' . str_replace(' ', '', ucwords(str_replace('_', ' ', $bugsys->options['authmethod']))); +$authClass = 'Authentication' . str_replace(' ', '', ucwords(str_replace('_', ' ', $authMethod))); $bugsys->auth = $auth = new $authClass(); if ($auth->authenticateCookies()) -- 2.43.5