Admin side of permissions done, still need to be enforced.

This commit is contained in:
Richard Underwood 2017-01-06 13:59:44 +00:00
parent 4eb40af5b7
commit 6033bc12aa
5 changed files with 322 additions and 21 deletions

View file

@ -28,7 +28,11 @@ function get_group_name($id) {
$r = $q->execute();
$ret = $r->fetchArray(SQLITE3_NUM);
return $ret[0];
if($ret) {
return $ret[0];
} else {
return null;
}
}
function group_exists($name) {
@ -117,6 +121,15 @@ function get_user_id($user) {
}
}
function get_group_id($group) {
$info=get_group_info($group);
if($info) {
return $info['id'];
} else {
return null;
}
}
function is_group_member($id,$user) {
$db = get_db();