22 define(
"TITLE_ADD_GROUP", _(
"Add Group"));
30 function __construct()
32 $this->Name =
"group_add";
33 $this->Title = TITLE_ADD_GROUP;
34 $this->MenuList =
"Admin::Groups::Add Group";
37 parent::__construct();
41 public function Output()
46 if (! empty($groupname)) {
49 $userDao = $GLOBALS[
'container']->get(
'dao.user');
50 $groupId = $userDao->addGroup($groupname);
51 $userDao->addGroupMembership($groupId, Auth::getUserId());
54 $this->vars[
'message'] =
"$text $groupname $text1.";
55 }
catch (Exception $e) {
56 $this->vars[
'message'] = $e->getMessage();
61 $text = _(
"Add a Group");
62 $V.=
"<h4>$text</h4>\n";
63 $V.=
"<form name='formy' method='POST' action=" .
Traceback_uri() .
"?mod=group_add>\n";
65 $text = _(
"Enter the groupname:");
67 $V.=
"<input type='text' value='$Val' name='groupname' size=20>\n";
69 $V.=
"<input type='submit' value='$text'>\n";
Traceback_uri()
Get the URI without query to this location.
GetParm($parameterName, $parameterType)
This function will retrieve the variables and check data types.
#define PLUGIN_DB_WRITE
Plugin requires write permission on DB.
This is the Plugin class. All plugins should: