Skip to content
Snippets Groups Projects
Commit 1ea228a4 authored by Robert Anderson's avatar Robert Anderson
Browse files

Added updateAdminGroup and getAdminGroup functions

parent 608d5fda
No related branches found
No related tags found
No related merge requests found
......@@ -42,6 +42,29 @@ function getAdminGroups($params) {
return array($resultArray,$numResults);
}
# Return list of users
function getAdminGroup($params) {
global $db;
$res = DBSelect("SELECT ID, Name, Priority, Disabled, Comment FROM groups WHERE ID = ?",array($params[0]));
if (!is_object($res)) {
return $res;
}
$resultArray = array();
$row = $res->fetchObject();
$resultArray['ID'] = $row->id;
$resultArray['Name'] = $row->name;
$resultArray['Priority'] = $row->priority;
$resultArray['Disabled'] = $row->disabled;
$resultArray['Comment'] = $row->comment;
return $resultArray;
}
# Remove admin group
function removeAdminGroup($params) {
global $db;
......@@ -66,4 +89,16 @@ function createAdminGroup($params) {
return NULL;
}
# Edit admin group
function updateAdminGroup($params) {
global $db;
$res = DBDo("UPDATE groups SET Name = ? WHERE ID = ?",array($params[0]['Name'],$params[0]['ID']));
if (!is_numeric($res)) {
return $res;
}
return NULL;
}
?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment