Skip to content
Snippets Groups Projects
Commit de987b47 authored by Thomas Müller's avatar Thomas Müller
Browse files

Update settings/ajax/removeuser.php

respect coding style
parent 04aea1eb
No related branches found
No related tags found
No related merge requests found
<?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{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment