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

Registers a user in the OfficeClip system.

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

Syntax

C#
public int RegisterUser(
	string firstName,
	string lastName,
	string emailAddress,
	string ldapAccountName,
	string password,
	string workPhonePrimary,
	string groupName,
	string grpType,
	int groupTimezoneId,
	int userTimezoneId,
	AddressInfo ai,
	out int userId,
	out int groupId
)
Visual Basic (Declaration)
Public Function RegisterUser ( _
	firstName As String, _
	lastName As String, _
	emailAddress As String, _
	ldapAccountName As String, _
	password As String, _
	workPhonePrimary As String, _
	groupName As String, _
	grpType As String, _
	groupTimezoneId As Integer, _
	userTimezoneId As Integer, _
	ai As AddressInfo, _
	<OutAttribute> ByRef userId As Integer, _
	<OutAttribute> ByRef groupId As Integer _
) As Integer
Visual C++
public:
int RegisterUser(
	String^ firstName, 
	String^ lastName, 
	String^ emailAddress, 
	String^ ldapAccountName, 
	String^ password, 
	String^ workPhonePrimary, 
	String^ groupName, 
	String^ grpType, 
	int groupTimezoneId, 
	int userTimezoneId, 
	AddressInfo^ ai, 
	[OutAttribute] int% userId, 
	[OutAttribute] int% groupId
)

Parameters

firstName
Type: System..::.String
First name of the user.
lastName
Type: System..::.String
Last name of the user.
emailAddress
Type: System..::.String
Email Address of the user.
ldapAccountName
Type: System..::.String
LDAP Account Name of the user.
password
Type: System..::.String
password of the user.
workPhonePrimary
Type: System..::.String
Primary work phone number of the user.
groupName
Type: System..::.String
Name of the group or organization.
grpType
Type: System..::.String
Type of the group i.e. whether it is group or organization. OfficeClip.Utils..::.GroupType
groupTimezoneId
Type: System..::.Int32
Timezone id of the group.
userTimezoneId
Type: System..::.Int32
Timezone id of the user.
ai
Type: OfficeClip.BusinessLayer.Account..::.AddressInfo
Instance of AddressInfo object containing all the information related to the Address of the registering user.
userId
Type: System..::.Int32%
The unique id of the user
groupId
Type: System..::.Int32%
The unique id of the group

Return Value

Integer flag indicating whether the registration was successful or not. Following is the list of possible values returned and their meanings. 0 = Successful -1 = Group or Orgnaization name already exists. -2 = User is already registered. -3 = LDAP Account Name entered has already been used for another user (If LDAP Authentication is enabled). -4 = LDAP Account Name entered could not be authenticated on the LDAP Server. (If LDAP Authentication is enabled).

Remarks

Please make sure that firstName, lastName, emailAddress, ldapAccountName, password values are not empty. The validation for emptyness should be done before calling this method. Also note that only organization and Group type should be passed as argument during registration.

See Also