<?php

if ($_POST['checked'] === 'false') {
    OC_User::disableUser($_POST['user']);
} else {
    OC_User::enableUser($_POST['user']);
}
Ejemplo n.º 2
0
 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));
 }