[admin_creategroup]

Description

Link: [admin_creategroup]
Author: Jason Huck
Category: Administration
Version: 8.x
License:
Posted: Nov. 21, 2006
Updated: Jan. 01, 0001
More by this author...
Adds a new group to Lasso Admin by exposing the internal tag [_admin_addgroup]. Requires authentication as a user with permissions on Lasso's internal db's, i.e., with [auth_admin].

Parameters

-name string, required The name of the group to add.
-enabled string, optional Accepts 'Y' or 'N' for whether the group should be enabled.
-comment string, optional An optional comment.

Sample Usage

admin_creategroup(
	-name='TestGroup',
	-enabled='Y',
	-comment='This is a test group.'
);
						

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
define_tag(
	'creategroup',
	-namespace='admin_',
	-req='name',
	-priority='replace',
	-description='Adds a new group to Lasso Admin.'
);
	admin_listgroups >> #name ? return(false);
	
	local('params' = array);
	
	iterate(params, local('i'));
		#params->insert(string_removeleading(#i->first, -pattern='-') = #i->second);
	/iterate;
	
	local('add') = \_admin_addgroup;
	#add->run( -params=#params);
	
	return(true);
/define_tag;

 

Related Tags



Comments

none

Email:


Password:



Newest

Most Popular