Interface IUserPlugin
Interface required to implement for User Plugins to provide defulat values.
Namespace: SuperOffice.CRM.Administration
Assembly: SoDataBase.dll
Syntax
public interface IUserPlugin
Remarks
The plugin must be declared with UserPluginAttribute.
The default implementation UserPlugin can also be used.
Methods
GetDefaultAssociateName(UserType, Person, CheckIfAssociateNameIsLegal)
Get default associate name for a user.
Declaration
string GetDefaultAssociateName(UserType type, Person person, CheckIfAssociateNameIsLegal validator)
Parameters
Type | Name | Description |
---|---|---|
UserType | type | Type of user. |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
CheckIfAssociateNameIsLegal | validator | Validator to help check if the an associate name is valid. |
Returns
Type | Description |
---|---|
string | Default associate name validated with the provided CheckIfAssociateNameIsLegal delegate. |
Remarks
The plugin must be declared with UserPluginAttribute.
The default implementation UserPlugin can also be used.
GetDefaultAssociateUserName(UserType, Person, CheckIfAssociateNameIsLegal)
Get default associate user name for a user.
Declaration
string GetDefaultAssociateUserName(UserType type, Person person, CheckIfAssociateNameIsLegal validator)
Parameters
Type | Name | Description |
---|---|---|
UserType | type | Type of user. |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
CheckIfAssociateNameIsLegal | validator | Validator to help check if the an associate user name is valid. |
Returns
Type | Description |
---|---|
string | Default associate user name validated with the provided CheckIfAssociateNameIsLegal delegate. |
Remarks
The plugin must be declared with UserPluginAttribute.
The default implementation UserPlugin can also be used.
GetDefaultPrimaryGroup(UserType, Person)
Get default primary group for the user.
Declaration
int GetDefaultPrimaryGroup(UserType type, Person person)
Parameters
Type | Name | Description |
---|---|---|
UserType | type | Type of user. |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
Returns
Type | Description |
---|---|
int | Default primary group id. |
Remarks
The plugin must be declared with UserPluginAttribute.
The default implementation UserPlugin can also be used.
GetDefaultRole(UserType, Person)
Get default role id for the user
Declaration
int GetDefaultRole(UserType type, Person person)
Parameters
Type | Name | Description |
---|---|---|
UserType | type | Type of user. |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
Returns
Type | Description |
---|---|
int | Default role id for the user. |
Remarks
The plugin must be declared with UserPluginAttribute.
The default implementation UserPlugin can also be used.
GetDefaultSecondaryGroups(UserType, Person)
Get default secondary groups for the user
Declaration
int[] GetDefaultSecondaryGroups(UserType type, Person person)
Parameters
Type | Name | Description |
---|---|---|
UserType | type | Type of user. |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
Returns
Type | Description |
---|---|
int[] | Default secoundary group ids |
Remarks
The plugin must be declared with UserPluginAttribute.
The default implementation UserPlugin can also be used.
GetValidAssociateName(UserType, Person, string, CheckIfAssociateNameIsLegal)
Get valid associate name for a user.
Declaration
string GetValidAssociateName(UserType type, Person person, string associateName, CheckIfAssociateNameIsLegal validator)
Parameters
Type | Name | Description |
---|---|---|
UserType | type | Type of user. |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
string | associateName | Candidate for associate name. |
CheckIfAssociateNameIsLegal | validator | Validator to help check if the an associate name is valid. |
Returns
Type | Description |
---|---|
string | Default associate name validated with the provided CheckIfAssociateNameIsLegal delegate. |
Remarks
The plugin must be declared with UserPluginAttribute.
The default implementation UserPlugin can also be used.
GetValidAssociateUserName(UserType, Person, string, CheckIfAssociateNameIsLegal)
Get valid associate user name for a user.
Declaration
string GetValidAssociateUserName(UserType type, Person person, string associateUserName, CheckIfAssociateNameIsLegal validator)
Parameters
Type | Name | Description |
---|---|---|
UserType | type | Type of user. |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
string | associateUserName | Candidate for user name. |
CheckIfAssociateNameIsLegal | validator | Validator to help check if the an associate name is valid. |
Returns
Type | Description |
---|---|
string | Default associate user name validated with the provided CheckIfAssociateNameIsLegal delegate. |
Remarks
The plugin must be declared with UserPluginAttribute.
The default implementation UserPlugin can also be used.
ProcessProvidedAssociateName(string, int, UserType, Person, CheckIfAssociateNameIsLegal)
Process a provided associate name and allow modifications of an associate name.
Declaration
string ProcessProvidedAssociateName(string providedAssociateName, int associateId, UserType type, Person person, CheckIfAssociateNameIsLegal validator)
Parameters
Type | Name | Description |
---|---|---|
string | providedAssociateName | Provided associate name |
int | associateId | Associate id of the user. The value 0 will be provided for new users. |
UserType | type | Type of user |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
CheckIfAssociateNameIsLegal | validator | Validator to help check if the an associate name is valid. |
Returns
Type | Description |
---|---|
string | Associate name validated with the provided CheckIfAssociateNameIsLegal delegate. |
Remarks
The name provided is guaranteed to meet the requirements set forth by teh provided validator.
ProcessProvidedAssociateUserName(string, int, UserType, Person, CheckIfAssociateNameIsLegal)
Process a provided associate user name and allow modifications of an associate user name.
Declaration
string ProcessProvidedAssociateUserName(string providedAssociateUserName, int associateId, UserType type, Person person, CheckIfAssociateNameIsLegal validator)
Parameters
Type | Name | Description |
---|---|---|
string | providedAssociateUserName | Provided associate user name |
int | associateId | Associate id of the user. The value 0 will be provided for new users. |
UserType | type | Type of user |
Person | person | Person this is a user for. This value will be null (VB Noting) for System and Anonymous users. |
CheckIfAssociateNameIsLegal | validator | Validator to help check if the an associate name is valid. |
Returns
Type | Description |
---|---|
string | Associate user name validated with the provided CheckIfAssociateNameIsLegal delegate. |
Remarks
The user name provided is guaranteed to meet the requirements set forth by teh provided validator.