Add specified role.
public void AddRole( string roleName )
Parameters:
roleName
- Name of the role to add.
Adds a new Atomia user to the data source.
public void AddUser( AtomiaUser user, string password);
Parameters:
user
- Atomia user.
password
- User's password.
Adds the users to roles.
public void AddUsersToRoles( string[] usernames, string[] roles )
Parameters:
usernames
- The usernames.
roles
- The roles.
Delete specified role.
public void DeleteRole( string roleName )
Parameters:
roleName
- Name of the role to delete.
Finds Atomia user by certain property.
public AtomiaUser[] FindByProperty( Dictionary<string, string> atomiaProperty, bool fillUserProperties )
Parameters:
atomiaProperty
- property to search for.
fillUserProperties
- Indicator to point whether return array of Atomia users will be filled with Atomia user properties.
Return value: Array of Atomia users which has property as the given one.
Returns a list of membership users where the email matches the supplied
emailPattern
.
public AtomiaUser[] FindUsersByEmail( string emailPattern, int pageIndex, int pageSize, out int totalRecords, bool fillUserProperties )
Parameters:
emailPattern
- The user email pattern to search for. If your data source supports additional search capabilities, such as wildcard characters, you can provide more extensive search capabilities for e-mail addresses.
pageIndex
- The zero-based index of the page of results to return.
pageSize
- The size of the page of results to return.
totalRecords
- The total number of matched users.
fillUserProperties
- Indicator to point whether return array of Atomia users will be filled with Atomia user properties.
Return value:
Collection that contains a page of
pageSize
AtomiaUser objects beginning at the page specified by
pageIndex
.
Returns a list of membership users where the user name matches the supplied usernamePattern.
public AtomiaUser[] FindUsersByName( string usernamePattern, int pageIndex, int pageSize, out int totalRecords, bool fillUserProperties);
Parameters:
usernamePattern
- The user name to search for. If your data source supports additional search capabilities, such as wildcard characters, you can provide more extensive search capabilities for user names.
pageIndex
- The zero-based index of the page of results to return.
pageSize
- The size of the page of results to return.
totalRecords
- The total number of matched users.
fillUserProperties
- Indicator to point whether return array of Atomia users will be filled with Atomia user properties.
Return value:
Collection that contains a page of
pageSize
AtomiaUsers objects beginning at the page specified by
pageIndex
.
Returns a list of users in a role where the user name contains a match of the supplied username pattern.
public AtomiaUser[] FindUsersInRole( string roleName, string usernamePattern, bool fillUserProperties )
Parameters:
roleName
- The name of the role.
usernamePattern
- The user name to search for. Wildcard support is included based on the data source.
fillUserProperties
- Indicator to point whether return array of Atomia users will be filled with Atomia user properties.
Return value:
List of users in a role where the user name matches
usernamePattern
.
Gets all roles.
public string[] GetAllRoles()
Return value: A string array containing the names of all the roles stored.
Returns an array of membership users.
public AtomiaUser[] GetAllUsers( int pageIndex, int pageSize, out int totalRecords, bool fillUserProperties )
Parameters:
pageIndex
- The index of the page of results to return.
pageIndex
is zero-based.
pageSize
- The size of the page of results to return.
totalRecords
- The total number of matched users.
fillUserProperties
- Indicator to point whether return array of Atomia users will be filled with Atomia user properties.
Return value:
Collection that contains a page of
pageSize
AtomiaUser objects beginning at the page specified by
pageIndex
.
Gets a list of the roles that a specified user is.
public string[] GetRolesForUser( string username )
Parameters:
username
- The username of the user that belongs to specific roles.
Return value: List with the roles.
Gets information from the data source for a membership user.
public AtomiaUser GetUser( string username, bool fillUserProperties);
Parameters:
username
- The name of the user to return.
fillUserProperties
- Indicator to point whether return array of Atomia users will be filled with Atomia user properties.
Return value: Atomia user with user properties.
Returns a list of membership users where the user name matches the supplied username pattern.
public string GetUserNameByEmail( string email);
Parameters:
email
- The email address to search for.
Return value: The name of the user.
Returns all user that belong to specific role.
public AtomiaUser[] GetUsersInRole( string roleName, bool fillUserProperties )
Parameters:
roleName
- The role of the user.
fillUserProperties
- Indicator to point whether return array of Atomia users will be filled with Atomia user properties.
Return value: List with the names of all the users who are members of the specified role.
Modifies Atomia user properties.
public void ModifyAtomiaUser( AtomiaUser user )
Parameters:
user
- Atomia user.
Updates password for the user in the data source.
public void ModifyPassword( string username, string oldPassword, string newPassword);
Parameters:
username
- Username of the user.
oldPassword
- Current password for the specified user.
newPassword
- New password.
Deletes user.
public void RemoveUser( string username )
Parameters:
username
- The username of the user to delete.
Removes user from specific role.
public void RemoveUserFromRole( string[] usernames, string[] roles )
Parameters:
usernames
- A string array of user names to be removed from the specified roles.
roles
- A string array of role names to remove the specified user names from.
Verifies that the specified user name and password exist in the data source.
public bool ValidateUser( string username, string password);
Parameters:
username
- Name of the user to validate.
password
- Password for the specified user.
Return value: True if username and password are valid, otherwise returns false.