Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bart@thisnet.nl>2011-09-18 23:31:56 +0400
committerBart Visscher <bart@thisnet.nl>2011-09-18 23:31:56 +0400
commite990ef35426b7dde59ec74eb1568a8cfbd69f316 (patch)
tree9b4a276885378540812ce93c3cddcc73a00ba3b0 /settings/users.php
parent8966ed5a004a9b830f093355170d381566d58554 (diff)
Move some common code to OC_Util
Created the following function: - checkLoggedIn - checkAdminUser - redirectToDefaultPage
Diffstat (limited to 'settings/users.php')
-rw-r--r--settings/users.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/settings/users.php b/settings/users.php
index 5aae4ce43ef..9ca2cb369f7 100644
--- a/settings/users.php
+++ b/settings/users.php
@@ -6,10 +6,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();
// We have some javascript foo!
OC_Util::addScript( 'settings', 'users' );