Update groups.php
This commit is contained in:
parent
7021484772
commit
edb1a964a7
|
|
@ -91,27 +91,32 @@ if (!class_exists('groups')) {
|
||||||
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
$result = $prep_statement->fetchAll(PDO::FETCH_ASSOC);
|
||||||
if (count($result) == 0) {
|
if (count($result) == 0) {
|
||||||
$x = 0;
|
$x = 0;
|
||||||
$tmp[$x]['group_name'] = 'superadmin';
|
//$groups[$x]['group_uuid'] = '';
|
||||||
$tmp[$x]['group_description'] = 'Super Administrator Group';
|
$groups[$x]['group_name'] = 'superadmin';
|
||||||
$tmp[$x]['group_protected'] = 'false';
|
$groups[$x]['group_description'] = 'Super Administrator Group';
|
||||||
|
$groups[$x]['group_protected'] = 'false';
|
||||||
$x++;
|
$x++;
|
||||||
$tmp[$x]['group_name'] = 'admin';
|
//$groups[$x]['group_uuid'] = '';
|
||||||
$tmp[$x]['group_description'] = 'Administrator Group';
|
$groups[$x]['group_name'] = 'admin';
|
||||||
$tmp[$x]['group_protected'] = 'false';
|
$groups[$x]['group_description'] = 'Administrator Group';
|
||||||
|
$groups[$x]['group_protected'] = 'false';
|
||||||
$x++;
|
$x++;
|
||||||
$tmp[$x]['group_name'] = 'user';
|
//$groups[$x]['group_uuid'] = '';
|
||||||
$tmp[$x]['group_description'] = 'User Group';
|
$groups[$x]['group_name'] = 'user';
|
||||||
$tmp[$x]['group_protected'] = 'false';
|
$groups[$x]['group_description'] = 'User Group';
|
||||||
|
$groups[$x]['group_protected'] = 'false';
|
||||||
$x++;
|
$x++;
|
||||||
$tmp[$x]['group_name'] = 'public';
|
//$groups[$x]['group_uuid'] = '';
|
||||||
$tmp[$x]['group_description'] = 'Public Group';
|
$groups[$x]['group_name'] = 'public';
|
||||||
$tmp[$x]['group_protected'] = 'false';
|
$groups[$x]['group_description'] = 'Public Group';
|
||||||
|
$groups[$x]['group_protected'] = 'false';
|
||||||
$x++;
|
$x++;
|
||||||
$tmp[$x]['group_name'] = 'agent';
|
//$groups[$x]['group_uuid'] = '';
|
||||||
$tmp[$x]['group_description'] = 'Call Center Agent Group';
|
$groups[$x]['group_name'] = 'agent';
|
||||||
$tmp[$x]['group_protected'] = 'false';
|
$groups[$x]['group_description'] = 'Call Center Agent Group';
|
||||||
|
$groups[$x]['group_protected'] = 'false';
|
||||||
$this->db->beginTransaction();
|
$this->db->beginTransaction();
|
||||||
foreach($tmp as $row) {
|
foreach($groups as $row) {
|
||||||
if (strlen($row['group_name']) > 0) {
|
if (strlen($row['group_name']) > 0) {
|
||||||
$sql = "insert into v_groups ";
|
$sql = "insert into v_groups ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue