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
|
@ -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 = ?');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue