From e990ef35426b7dde59ec74eb1568a8cfbd69f316 Mon Sep 17 00:00:00 2001 From: Bart Visscher Date: Sun, 18 Sep 2011 21:31:56 +0200 Subject: Move some common code to OC_Util Created the following function: - checkLoggedIn - checkAdminUser - redirectToDefaultPage --- settings/apps.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'settings/apps.php') diff --git a/settings/apps.php b/settings/apps.php index 337a52fd416..672cb18775e 100644 --- a/settings/apps.php +++ b/settings/apps.php @@ -22,10 +22,7 @@ */ require_once('../lib/base.php'); -if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){ - header( "Location: ".OC_Helper::linkTo( "", "index.php" )); - exit(); -} +OC_Util::checkAdminUser(); // Load the files we need OC_Util::addStyle( "settings", "settings" ); -- cgit v1.2.3