mirror of
https://github.com/tuxis-ie/nsedit.git
synced 2025-06-07 00:47:00 +03:00
Admin side of permissions done, still need to be enforced.
This commit is contained in:
parent
4eb40af5b7
commit
6033bc12aa
5 changed files with 322 additions and 21 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue