diff --git a/lib/private/group/database.php b/lib/private/group/database.php
index e6a5565b20eaca3f98f03645e90858b1f4608beb..8aebefabd275f34a08ddb1a3fb318c6fb3f3c51c 100644
--- a/lib/private/group/database.php
+++ b/lib/private/group/database.php
@@ -168,7 +168,7 @@ class OC_Group_Database extends OC_Group_Backend {
 	 * Returns a list with all groups
 	 */
 	public function getGroups($search = '', $limit = null, $offset = null) {
-		$stmt = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE `gid` LIKE ? ORDER BY `gid` ASC', $limit, $offset);
+		$stmt = OC_DB::prepare('SELECT `gid` FROM `*PREFIX*groups` WHERE LOWER(`gid`) LIKE LOWER(?) ORDER BY `gid` ASC', $limit, $offset);
 		$result = $stmt->execute(array('%' . $search . '%'));
 		$groups = array();
 		while ($row = $result->fetchRow()) {