From 107c9307321e87408293afc1c6c322b42792ddc8 Mon Sep 17 00:00:00 2001 From: stan Date: Fri, 4 Nov 2005 17:04:14 +0000 Subject: [PATCH] Fixed broken logins git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1545 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_html.php | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/web/zm_html.php b/web/zm_html.php index dfa6a0d21..39f368007 100644 --- a/web/zm_html.php +++ b/web/zm_html.php @@ -86,21 +86,22 @@ $scales = array( "25" => "1/4x", ); +if ( !isset($user) && ZM_OPT_USE_AUTH ) +{ + if ( ZM_AUTH_TYPE == "remote" && !empty( $_SERVER['REMOTE_USER'] ) ) + { + $view = "postlogin"; + $action = "login"; + $username = $_SERVER['REMOTE_USER']; + } +} + +require_once( 'zm_funcs.php' ); +require_once( 'zm_actions.php' ); + if ( !isset($user) ) { - if ( ZM_OPT_USE_AUTH ) - { - if ( ZM_AUTH_TYPE == "remote" && !empty( $_SERVER['REMOTE_USER'] ) ) - { - $view = "postlogin"; - $action = "login"; - $username = $_SERVER['REMOTE_USER']; - } - else - { - $view = "login"; - } - } + $view = "login"; } else { @@ -123,9 +124,6 @@ if ( !isset($view) ) $view = "console"; } -require_once( 'zm_funcs.php' ); -require_once( 'zm_actions.php' ); - switch( $view ) { case "login" :