diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2012-10-15 16:41:42 +0200 |
---|---|---|
committer | Daniel Molkentin <daniel@molkentin.de> | 2012-10-15 17:44:44 +0200 |
commit | 6b39b80648ea022cfb5839d1ac415912cafaa417 (patch) | |
tree | 4a8744fdd2f9cd5e4d361dd22ee896d71dd677b3 /settings/ajax/createuser.php | |
parent | 6e045b9ea1f3435da3456d333a57753069b6bc8c (diff) | |
download | nextcloud-server-6b39b80648ea022cfb5839d1ac415912cafaa417.tar.gz nextcloud-server-6b39b80648ea022cfb5839d1ac415912cafaa417.zip |
Change auth checks
Diffstat (limited to 'settings/ajax/createuser.php')
-rw-r--r-- | settings/ajax/createuser.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/settings/ajax/createuser.php b/settings/ajax/createuser.php index bdf7e4983ac..b3e5c23de54 100644 --- a/settings/ajax/createuser.php +++ b/settings/ajax/createuser.php @@ -3,13 +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_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; |