summaryrefslogtreecommitdiffstats
path: root/settings/ajax/creategroup.php
diff options
context:
space:
mode:
Diffstat (limited to 'settings/ajax/creategroup.php')
-rw-r--r--settings/ajax/creategroup.php9
1 files changed, 1 insertions, 8 deletions
diff --git a/settings/ajax/creategroup.php b/settings/ajax/creategroup.php
index 83733ac4d2d..431b449a811 100644
--- a/settings/ajax/creategroup.php
+++ b/settings/ajax/creategroup.php
@@ -3,14 +3,7 @@
// Init owncloud
require_once '../../lib/base.php';
OCP\JSON::callCheck();
-
-// Check if we are a user
-if( !OC_User::isLoggedIn() || !OC_Group::inGroup( OC_User::getUser(), 'admin' )) {
- OC_JSON::error(array("data" => array( "message" => $l->t("Authentication error") )));
- exit();
-}
-
-OCP\JSON::callCheck();
+OC_JSON::checkAdminUser();
$groupname = $_POST["groupname"];