summaryrefslogtreecommitdiffstats
path: root/settings/ajax/createuser.php
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-10-17 16:38:11 +0200
committerBart Visscher <bartv@thisnet.nl>2012-10-17 16:38:11 +0200
commit6081bfa2bcbe121e373486273ecce58a49e6fa97 (patch)
treef2504800c66919a53eff9323724b493079569495 /settings/ajax/createuser.php
parentc2b4e534534e083147bbad9b564179832cfa2912 (diff)
parent44287d680bd0e8799724a7595db43c0fafcaff40 (diff)
downloadnextcloud-server-6081bfa2bcbe121e373486273ecce58a49e6fa97.tar.gz
nextcloud-server-6081bfa2bcbe121e373486273ecce58a49e6fa97.zip
Merge branch 'master' into routing
Conflicts: lib/search/provider/file.php settings/ajax/changepassword.php settings/settings.php
Diffstat (limited to 'settings/ajax/createuser.php')
-rw-r--r--settings/ajax/createuser.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php
index 49fc0e0f53b..c87ff422f61 100644
--- a/settings/ajax/createuser.php
+++ b/settings/ajax/createuser.php
@@ -1,13 +1,7 @@
<?php
OCP\JSON::callCheck();
-
-// Check if we are a user
-if( !OC_User::isLoggedIn() || (!OC_Group::inGroup( OC_User::getUser(), 'admin' ) && !OC_SubAdmin::isSubAdmin(OC_User::getUser()))) {
- OC_JSON::error(array("data" => array( "message" => "Authentication error" )));
- exit();
-}
-OCP\JSON::callCheck();
+OC_JSON::checkSubAdminUser();
$isadmin = OC_Group::inGroup(OC_User::getUser(), 'admin')?true:false;