[This is preliminary documentation and is subject to change.]

Add a new member with userId and GroupId as input parameter

Namespace:  OfficeClip.DBLayer.Account
Assembly:  OfficeClip.DBLayer (in OfficeClip.DBLayer)
Version: 8.1.1.0

Syntax

C#
public int AddMembers(
	int userId,
	int groupId,
	ref int status,
	ref string name,
	ref string emailAddress,
	ref string ldapAccountName,
	int currentUserId
)
Visual Basic (Declaration)
Public Function AddMembers ( _
	userId As Integer, _
	groupId As Integer, _
	ByRef status As Integer, _
	ByRef name As String, _
	ByRef emailAddress As String, _
	ByRef ldapAccountName As String, _
	currentUserId As Integer _
) As Integer
Visual C++
public:
int AddMembers(
	int userId, 
	int groupId, 
	int% status, 
	String^% name, 
	String^% emailAddress, 
	String^% ldapAccountName, 
	int currentUserId
)

Parameters

userId
Type: System..::.Int32
Unique id of the user to be added to the group
groupId
Type: System..::.Int32
Id of the group to which the user is being added
status
Type: System..::.Int32%
name
Type: System..::.String%
The name of the user to be added
emailAddress
Type: System..::.String%
The email address of the user to be added
ldapAccountName
Type: System..::.String%
The ldap account name
currentUserId
Type: System..::.Int32
Teh user id of the login user

Return Value

  • 0success
  • -1the user is already present in the group
  • -2email could not be sent
  • -3the alert could not be sent
  • -4the accounting is enabled and the user can be added to the account, but the account_id of the invitor is null for some reason.
  • -5accounting is enabled and the user is already present in some other paid account If accounting is not enabled then this check is skipped
  • -6accounting is enabled and the user can be added to the account, if the number of users in this account reached.
  • -7by any reason the site users license Limit drops below zero.
  • -8if LDAP authentication is enabled and the ldap account name being added is already used up.

See Also