name = $group; $groupobj->description = $description; $groupobj->active = $active; \CMSMS\HookManager::do_hook('Core::AddGroupPre', [ 'group'=>&$groupobj ] ); $result = $groupobj->save(); if( !$result ) throw new \RuntimeException(lang('errorinsertinggroup')); \CMSMS\HookManager::do_hook('Core::AddGroupPost', [ 'group'=>&$groupobj ] ); // put mention into the admin log audit($groupobj->id, 'Admin User Group: '.$groupobj->name, 'Added'); redirect("listgroups.php".$urlext); return; } catch( \Exception $e ) { $error .= '
  • '.$e->GetMessage().'
  • '; } } } include_once("header.php"); if (!$access) { echo "

    ".lang('noaccessto', array(lang('addgroup')))."

    "; } else { if ($error != "") { echo "
    "; } ?>
    ShowHeader('addgroup'); ?>

    />