parent
04aea1eb2e
commit
de987b475d
|
@ -1,21 +1,21 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Init owncloud
|
// Init owncloud
|
||||||
require_once('../../lib/base.php');
|
require_once '../../lib/base.php';
|
||||||
|
|
||||||
OC_JSON::checkSubAdminUser();
|
OC_JSON::checkSubAdminUser();
|
||||||
OCP\JSON::callCheck();
|
OCP\JSON::callCheck();
|
||||||
|
|
||||||
$username = $_POST["username"];
|
$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');
|
$l = OC_L10N::get('core');
|
||||||
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
|
OC_JSON::error(array( 'data' => array( 'message' => $l->t('Authentication error') )));
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return Success story
|
// Return Success story
|
||||||
if( OC_User::deleteUser( $username )){
|
if( OC_User::deleteUser( $username )) {
|
||||||
OC_JSON::success(array("data" => array( "username" => $username )));
|
OC_JSON::success(array("data" => array( "username" => $username )));
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|
Loading…
Reference in New Issue