From: Robin Appelman Date: Sun, 18 Sep 2011 11:34:29 +0000 (+0200) Subject: fix creating groups X-Git-Tag: v3.0~180^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0714e83a8e9f6c793822b02b870686294b949763;p=nextcloud-server.git fix creating groups --- diff --git a/lib/group/database.php b/lib/group/database.php index 7bf9c8bb5ce..f35f61434f0 100644 --- a/lib/group/database.php +++ b/lib/group/database.php @@ -56,7 +56,7 @@ class OC_Group_Database extends OC_Group_Backend { $query = OC_DB::prepare( "SELECT gid FROM `*PREFIX*groups` WHERE gid = ?" ); $result = $query->execute( array( $gid )); - if( !$result->fetchRow() ){ + if( $result->fetchRow() ){ // Can not add an existing group return false; } @@ -101,7 +101,7 @@ class OC_Group_Database extends OC_Group_Backend { $query = OC_DB::prepare( "SELECT uid FROM `*PREFIX*group_user` WHERE gid = ? AND uid = ?" ); $result = $query->execute( array( $gid, $uid )); - return $result->numRows() > 0 ? true : false; + return $result->fetchRow() ? true : false; } /**