November Happy Hour will be moved to Thursday December 5th.

Class SynchronizeUsersDB

Database access routines for users/roles synched from for example Windows membership provider/Windows role provider and users authenticated through Single Sign On.

Inheritance
System.Object
SynchronizeUsersDB
Namespace: EPiServer.DataAccess.Internal
Assembly: EPiServer.dll
Version: 12.0.3
Syntax
[ServiceConfiguration]
public class SynchronizeUsersDB : Object

Constructors

SynchronizeUsersDB(ServiceAccessor<IAsyncDatabaseExecutor>, ClaimTypeOptions)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public SynchronizeUsersDB(ServiceAccessor<IAsyncDatabaseExecutor> databaseHandler, ClaimTypeOptions claimTypeOptions)
Parameters
Type Name Description
ServiceAccessor<IAsyncDatabaseExecutor> databaseHandler
ClaimTypeOptions claimTypeOptions

Methods

DeleteRoleAsync(String, Boolean)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public Task<bool> DeleteRoleAsync(string roleName, bool forceDelete)
Parameters
Type Name Description
System.String roleName
System.Boolean forceDelete
Returns
Type Description
System.Threading.Tasks.Task<System.Boolean>

FindMatchingRolesAsync(String)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public Task<IEnumerable<string>> FindMatchingRolesAsync(string partOfRoleName)
Parameters
Type Name Description
System.String partOfRoleName
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

FindUsersAsync(String, Int32, Int32)

Declaration
public Task<PagedNotificationUserResult> FindUsersAsync(string partOfUser, int startIndex, int maxCount)
Parameters
Type Name Description
System.String partOfUser
System.Int32 startIndex
System.Int32 maxCount
Returns
Type Description
System.Threading.Tasks.Task<PagedNotificationUserResult>

FindUsersByNameAsync(String)

Lists users that have logged in and been sycnhed to site. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual Task<IEnumerable<string>> FindUsersByNameAsync(string userNameToMatch)
Parameters
Type Name Description
System.String userNameToMatch

The user names to match. Set to null to find all user names.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

A list of user names.

FindUsersInRoleAsync(String, String)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public Task<IEnumerable<string>> FindUsersInRoleAsync(string roleName, string userNameToMatch)
Parameters
Type Name Description
System.String roleName
System.String userNameToMatch
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

InsertRoleAsync(String)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public Task InsertRoleAsync(string roleName)
Parameters
Type Name Description
System.String roleName
Returns
Type Description
System.Threading.Tasks.Task

ListRolesForUserAsync(String)

Lists the roles that the user is a member of. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public Task<IEnumerable<string>> ListRolesForUserAsync(string userName)
Parameters
Type Name Description
System.String userName

Name of the user.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.String>>

A list with the roles.

Remarks

Note that this routine will only return correct information for a user that has been logged on and thereby gets it's roles synched. The role list is simply the role list that was current at the time of login, i e it may be out of sync at a later date.

ListRoleStatusAsync()

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public Task<IEnumerable<SynchronizedRoleStatus>> ListRoleStatusAsync()
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<SynchronizedRoleStatus>>

LoadMetadataAsync(String)

Declaration
public Task<NameValueCollection> LoadMetadataAsync(string userName)
Parameters
Type Name Description
System.String userName
Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Specialized.NameValueCollection>

SetVisibilityForRoleAsync(Boolean, String)

This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public Task SetVisibilityForRoleAsync(bool show, string role)
Parameters
Type Name Description
System.Boolean show
System.String role
Returns
Type Description
System.Threading.Tasks.Task

SynchronizeRolesAsync(String, IEnumerable<String>)

Synchronizes the role memberships for the user. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual Task SynchronizeRolesAsync(string userName, IEnumerable<string> roles)
Parameters
Type Name Description
System.String userName
System.Collections.Generic.IEnumerable<System.String> roles
Returns
Type Description
System.Threading.Tasks.Task

SynchronizeUser(String, String, String, String, NameValueCollection)

Synchronizes the user meta data. This member supports the EPiServer infrastructure and is not intended to be used directly from your code.

Declaration
public virtual Task<int> SynchronizeUser(string userName, string givenName, string surname, string email, NameValueCollection additionalMetadata)
Parameters
Type Name Description
System.String userName
System.String givenName
System.String surname
System.String email
System.Collections.Specialized.NameValueCollection additionalMetadata
Returns
Type Description
System.Threading.Tasks.Task<System.Int32>

Extension Methods