11 define(
"TITLE_ADD_GROUP", _(
"Add Group"));
21 $this->Name =
"group_add";
22 $this->Title = TITLE_ADD_GROUP;
23 $this->MenuList =
"Admin::Groups::Add Group";
26 parent::__construct();
35 if (! empty($groupname)) {
38 $userDao = $GLOBALS[
'container']->get(
'dao.user');
39 $groupId = $userDao->addGroup($groupname);
40 $userDao->addGroupMembership($groupId, Auth::getUserId());
43 $this->vars[
'message'] =
"$text $groupname $text1.";
44 }
catch (Exception $e) {
45 $this->vars[
'message'] = $e->getMessage();
50 $text = _(
"Add a Group");
51 $V.=
"<h4>$text</h4>\n";
52 $V.=
"<form name='formy' method='POST' action=" .
Traceback_uri() .
"?mod=group_add>\n";
54 $text = _(
"Enter the groupname:");
56 $V.=
"<input type='text' value='$Val' name='groupname' size=20>\n";
58 $V.=
"<input type='submit' value='$text'>\n";
This is the Plugin class. All plugins should:
Contains the constants and helpers for authentication of user.
__construct()
base constructor. Most plugins will just use this
Output()
This function is called when user output is requested. This function is responsible for content....
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.