<?php

if ($_POST['checked'] === 'false') {
    OC_User::disableUser($_POST['user']);
} else {
    OC_User::enableUser($_POST['user']);
}
 public function changeEnabled($checked, $user)
 {
     $checked === 'false' ? \OC_User::disableUser($user) : \OC_User::enableUser($user);
 }
 /**
  * @NoAdminRequired
  */
 public function changeEnabled($checked, $user)
 {
     $checked === 'false' ? \OC_User::disableUser($user) : \OC_User::enableUser($user);
     return new DataResponse(array($user => $checked));
 }