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

@ -114,6 +114,21 @@ function get_usernames_filtered($term, $num = 10) {
return $ret;
}
function get_groups_filtered($term, $num = 10) {
$db = get_db();
$q = $db->prepare("SELECT name FROM groups WHERE name LIKE ? ORDER BY name LIMIT 0, ?");
$q->bindValue(1, "%" . $term . "%", SQLITE3_TEXT);
$q->bindValue(2, $num, SQLITE3_INTEGER);
$r = $q->execute();
$ret = array();
while ($row = $r->fetchArray(SQLITE3_NUM)) {
array_push($ret, $row[0]);
}
return $ret;
}
function get_user_info($u) {
$db = get_db();
$q = $db->prepare('SELECT * FROM users WHERE emailaddress = ?');