Update settings/ajax/removeuser.php

respect coding style
This commit is contained in:
Thomas Müller 2012-09-04 12:51:04 +03:00
parent 04aea1eb2e
commit de987b475d
1 changed files with 3 additions and 3 deletions

View File

@ -1,21 +1,21 @@
<?php
// Init owncloud
require_once('../../lib/base.php');
require_once '../../lib/base.php';
OC_JSON::checkSubAdminUser();
OCP\JSON::callCheck();
$username = $_POST["username"];
if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)){
if(!OC_Group::inGroup(OC_User::getUser(), 'admin') && !OC_SubAdmin::isUserAccessible(OC_User::getUser(), $username)) {
$l = OC_L10N::get('core');
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
exit();
}
// Return Success story
if( OC_User::deleteUser( $username )){
if( OC_User::deleteUser( $username )) {
OC_JSON::success(array("data" => array( "username" => $username )));
}
else{