Implement groupExists in group database backend
This commit is contained in:
parent
8d56c42fde
commit
3533f43d12
|
@ -174,6 +174,20 @@ class OC_Group_Database extends OC_Group_Backend {
|
||||||
return $groups;
|
return $groups;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* check if a group exists
|
||||||
|
* @param string $gid
|
||||||
|
* @return bool
|
||||||
|
*/
|
||||||
|
public function groupExists($gid) {
|
||||||
|
$query = OC_DB::prepare('SELECT gid FROM *PREFIX*groups WHERE gid = ?');
|
||||||
|
$result = $query->execute(array($gid))->fetchOne();
|
||||||
|
if ($result) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief get a list of all users in a group
|
* @brief get a list of all users in a group
|
||||||
* @returns array with user ids
|
* @returns array with user ids
|
||||||
|
|
Loading…
Reference in New Issue