lib/private/Group/Database.php
/**
	 * get the number of all users matching the search string in a group
	 * @param string $gid
	 * @param string $search
	 * @return int|false
	 * @throws \OC\DatabaseException
	 */
get the number of all users matching the search string in a group
@param string $gid
@param string $search
@return int|false
@throws \OC\DatabaseException
get the number of all users matching the search string in a group @param string $gid @param string $search @return int|false @throws \ OC \ DatabaseException
public function countUsersInGroup($gid, $search = '') {
		$parameters = [$gid];
		$searchLike = '';
		if ($search !== '') {
			$parameters[] = '%' . $this->dbConn->escapeLikeParameter($search) . '%';
			$searchLike = ' AND `uid` LIKE ?';
		}
		$stmt = \OC_DB::prepare('SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ?' . $searchLike);
		$result = $stmt->execute($parameters);
		$count = $result->fetchOne();
		if($count !== false) {
			$count = intval($count);
		}
		return $count;
	}
public function countUsersInGroup ( $ gid , $ search = '' ) { $ parameters = [ $ gid ] ; $ searchLike = '' ; if ( $ search !== '' ) { $ parameters [ ] = '%' . $ this -> dbConn -> escapeLikeParameter ( $ search ) . '%' ; $ searchLike = ' AND `uid` LIKE ?' ; } $ stmt = \ OC_DB :: prepare ( 'SELECT COUNT(`uid`) AS `count` FROM `*PREFIX*group_user` WHERE `gid` = ?' . $ searchLike ) ; $ result = $ stmt -> execute ( $ parameters ) ; $ count = $ result -> fetchOne ( ) ; if ( $ count !== false ) { $ count = intval ( $ count ) ; } return $ count ; }
get the number of all users matching the search string in a group
 @param string $gid
 @param string $search
 @return int|false
 @throws \OC\DatabaseException
get the number of all users matching the search string in a group @param string $gid @param string $search @return int|false @throws \ OC \ DatabaseException