summaryrefslogtreecommitdiffstats
path: root/files/admin.php
diff options
context:
space:
mode:
authorBart Visscher <bart@thisnet.nl>2011-09-18 21:31:56 +0200
committerBart Visscher <bart@thisnet.nl>2011-09-18 21:31:56 +0200
commite990ef35426b7dde59ec74eb1568a8cfbd69f316 (patch)
tree9b4a276885378540812ce93c3cddcc73a00ba3b0 /files/admin.php
parent8966ed5a004a9b830f093355170d381566d58554 (diff)
downloadnextcloud-server-e990ef35426b7dde59ec74eb1568a8cfbd69f316.tar.gz
nextcloud-server-e990ef35426b7dde59ec74eb1568a8cfbd69f316.zip
Move some common code to OC_Util
Created the following function: - checkLoggedIn - checkAdminUser - redirectToDefaultPage
Diffstat (limited to 'files/admin.php')
-rw-r--r--files/admin.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/files/admin.php b/files/admin.php
index db47bc7c033..09237dfc1d5 100644
--- a/files/admin.php
+++ b/files/admin.php
@@ -25,12 +25,7 @@
// Init owncloud
require_once('../lib/base.php');
-
-// Check if we are a user
-if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )){
- header( "Location: ".OC_Helper::linkTo( "files", "index.php" ));
- exit();
-}
+OC_User::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true');
if(isset($_POST['maxUploadSize'])){