diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/index.php b/index.php index 89c24cac52f..105a04ad76e 100644 --- a/index.php +++ b/index.php @@ -24,9 +24,12 @@ require_once( 'lib/base.php' ); require_once( 'appconfig.php' ); require_once( 'template.php' ); -var_dump( $_SESSION ); -//exit; -if( OC_USER::isLoggedIn()){ + +// check if the server is correctly configured for ownCloud +$errors=OC_UTIL::checkServer(); +if(count($errors)>0){ + OC_TEMPLATE::printGuestPage( "", "error", array( "errors" => $errors )); +}elseif( OC_USER::isLoggedIn()){ if( $_GET["logout"] ){ OC_USER::logout(); header( "Location: $WEBROOT"); @@ -36,8 +39,7 @@ if( OC_USER::isLoggedIn()){ header( "Location: ".OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" )); exit(); } -} -else{ +}else{ if( OC_USER::login( $_POST["user"], $_POST["password"] )){ header( "Location: ".OC_APPCONFIG::getValue( "core", "defaultpage", "files/index.php" )); exit(); |