* @brief get the number of all users matching the search string in a group
* @param string $gid
* @param string $search
- * @param int $limit
- * @param int $offset
* @return int|false
+ * @throws DatabaseException
*/
public function countUsersInGroup($gid, $search = '') {
$stmt = OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ? AND `uid` LIKE ?');
* @param string $gid The name of the group to create
* @return bool
*
- * Trys to create a new group. If the group name already exists, false will
+ * Tries to create a new group. If the group name already exists, false will
* be returned.
*/
public function createGroup($gid) {
}
/**
- * @brief get a list of all groups
+ * @brief Get a list of all groups
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
* @return array an array of group names
- *
- * Returns a list with all groups
*/
public function getGroups($search = '', $limit = -1, $offset = 0) {
return array_keys($this->groups);
}
/**
- * @brief get a list of all users in a group
- * @return array an array of user ids
+ * @brief Get a list of all users in a group
+ * @param string $gid
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
+ * @return array an array of user IDs
*/
public function usersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
if(isset($this->groups[$gid])) {
/**
* @brief get the number of all users in a group
- * @return int|bool
+ * @param string $gid
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
+ * @return int
*/
public function countUsersInGroup($gid, $search = '', $limit = -1, $offset = 0) {
if(isset($this->groups[$gid])) {
* @param string $gid The name of the group to create
* @return bool
*
- * Trys to create a new group. If the group name already exists, false will
+ * Tries to create a new group. If the group name already exists, false will
* be returned.
*/
abstract public static function createGroup($gid);
/**
* @brief get a list of all groups
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
* @return array an array of group names
- *
- * Returns a list with all groups
*/
abstract public static function getGroups($search = '', $limit = -1, $offset = 0);
/**
- * check if a group exists
+ * @brief Check if a group exists
* @param string $gid
* @return bool
*/
/**
* @brief get a list of all users in a group
+ * @param string $gid
+ * @param string $search
+ * @param int $limit
+ * @param int $offset
* @return array an array of user ids
*/
abstract public static function usersInGroup($gid, $search = '', $limit = -1, $offset = 0);
-
}