"error", "data" => array("message" => "Authentication error"))); exit(); } $users = array(); $ocusers = OC_User::getUsers(); $self = OC_User::getUser(); $groups = OC_GROUP::getUserGroups($self); $users[] = ""; foreach ($ocusers as $user) { if ($user != $self) { $users[] = ""; } } $users[] = ""; $users[] = ""; foreach ($groups as $group) { $users[] = ""; } $users[] = ""; echo json_encode($users); ?>