Class UIUserProvider
Manages users and its settings.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Shell.Security
Assembly: EPiServer.Shell.dll
Version: 10.10.4Syntax
public abstract class UIUserProvider : IDisposable
Constructors
UIUserProvider()
Declaration
protected UIUserProvider()
Properties
Enabled
Indicating whether User management is enabled.
Declaration
public abstract bool Enabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnablePasswordReset
Gets a value indicating whether the current user provider is configured to allow users to reset their passwords.
Declaration
public virtual bool EnablePasswordReset { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
MinRequiredNonAlphanumericCharacters
Gets the minimum number of special characters that must be present in a valid password.
Declaration
public virtual int MinRequiredNonAlphanumericCharacters { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
MinRequiredPasswordLength
Gets the minimum length required for a password.
Declaration
public virtual int MinRequiredPasswordLength { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Name
The name of provider
Declaration
public abstract string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
RequiresQuestionAndAnswer
Gets a value indicating whether the user provider requires the user to answer a password question for password reset and retrieval.
Declaration
public virtual bool RequiresQuestionAndAnswer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
RequiresUniqueEmail
Gets a value indicating whether the user provider is configured to require a unique e-mail address for each user name.
Declaration
public virtual bool RequiresUniqueEmail { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
CreateUser(String, String, String, String, String, Boolean, out UIUserCreateStatus, out IEnumerable<String>)
Adds a new user with specified property values and returns a status parameter indicating that the user was successfully created or the reason the user creation failed.
Declaration
public abstract IUIUser CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, out UIUserCreateStatus status, out IEnumerable<string> errors)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The user name |
System.String | password | The password |
System.String | The email |
|
System.String | passwordQuestion | the password question |
System.String | passwordAnswer | The password-answer |
System.Boolean | isApproved | A Boolean that indicates whether the new user is approved to log on. |
UIUserCreateStatus | status | A CreateStatus indicating that the user was created successfully or the reason that creation failed. |
System.Collections.Generic.IEnumerable<System.String> | errors | Errors message from provider |
Returns
Type | Description |
---|---|
IUIUser | A IUserBase object for the newly created user. If no user was created, this method returns null. |
DeleteUser(String, Boolean)
Deletes a user and any related user data.
Declaration
public abstract bool DeleteUser(string username, bool deleteAllRelatedData)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The user name |
System.Boolean | deleteAllRelatedData | True to delete data related to the user from the database; false to leave data related to the user in the database. |
Returns
Type | Description |
---|---|
System.Boolean | true if the user was deleted; otherwise, false. |
DeleteUser(String, String, Boolean)
Deletes a user and any related user data.
Declaration
public virtual bool DeleteUser(string providerName, string username, bool deleteAllRelatedData)
Parameters
Type | Name | Description |
---|---|---|
System.String | providerName | The provider name |
System.String | username | The user name |
System.Boolean | deleteAllRelatedData | True to delete data related to the user from the database; false to leave data related to the user in the database. |
Returns
Type | Description |
---|---|
System.Boolean | true if the user was deleted; otherwise, false. |
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Disposes the provider
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | true if disposing |
FindUsersByEmail(String, Int32, Int32, out Int32)
Gets a collection of IUserBase , in a page of data, where the e-mail address contains the specified e-mail address to match.
Declaration
public abstract IEnumerable<IUIUser> FindUsersByEmail(string emailToMatch, int pageIndex, int pageSize, out int totalRecords)
Parameters
Type | Name | Description |
---|---|---|
System.String | emailToMatch | The e-mail address to search for |
System.Int32 | pageIndex | The index of the page of results to return. pageIndex is zero-based. |
System.Int32 | pageSize | The size of the page of results to return. |
System.Int32 | totalRecords | The total number of matched users. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IUIUser> | A list of IUserBase that contains a page of pageSize beginning at the page specified by pageIndex. |
FindUsersByName(String, Int32, Int32, out Int32)
Gets a collection of IUserBase users, in a page of data, where the user name contains the specified user name to match.
Declaration
public abstract IEnumerable<IUIUser> FindUsersByName(string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
Parameters
Type | Name | Description |
---|---|---|
System.String | usernameToMatch | The user name to search for. |
System.Int32 | pageIndex | The index of the page of results to return. pageIndex is zero-based. |
System.Int32 | pageSize | The size of the page of results to return. |
System.Int32 | totalRecords | The total number of matched users. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IUIUser> | A list of IUserBase that contains a page of pageSize beginning at the page specified by pageIndex. |
GetAllUsers(Int32, Int32, out Int32)
Gets a collection of all the users.
Declaration
public abstract IEnumerable<IUIUser> GetAllUsers(int pageIndex, int pageSize, out int totalRecords)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | pageIndex | The index of the page of results to return. Use 0 to indicate the first page. |
System.Int32 | pageSize | The size of the page of results to return. pageIndex is zero-based. |
System.Int32 | totalRecords | The total number of users. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IUIUser> | A list of IUserBase objects representing all the users. |
GetUser(String)
Gets specified IUserBase.
Declaration
public abstract IUIUser GetUser(string username)
Parameters
Type | Name | Description |
---|---|---|
System.String | username | The user name |
Returns
Type | Description |
---|---|
IUIUser | A IUserBase object representing the specified user. If the username parameter does not correspond to an existing user, this method returns null. |
GetUserComparer()
Get an instance of comparison object for IUserBase equality.
Declaration
public virtual IEqualityComparer<IUIUser> GetUserComparer()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEqualityComparer<IUIUser> | An instance of comparison object for IUserBase equality. |
GetWildcardSymbolFromDefaultProvider()
Gets the wildcard symbol from the user provider.
Declaration
public virtual string GetWildcardSymbolFromDefaultProvider()
Returns
Type | Description |
---|---|
System.String |
IsSupported(ProviderActions)
Determines whether a provider supports a specific EPiServer.Security.ProviderActions.
Declaration
public virtual bool IsSupported(ProviderActions action)
Parameters
Type | Name | Description |
---|---|---|
ProviderActions | action | Action on provider EPiServer.Security.ProviderActions |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if action on provider is supported otherwise false. |
IsSupported(String)
Determines whether the provider has support for the property is on the User model.
Declaration
public virtual bool IsSupported(string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | The property name |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the provider supports otherwise false. |
Remarks
Default we have 2 properties defined email and comment.
IsSupported(String, ProviderActions)
Determines whether a provider supports a specific EPiServer.Security.ProviderActions.
Declaration
public virtual bool IsSupported(string providerName, ProviderActions action)
Parameters
Type | Name | Description |
---|---|---|
System.String | providerName | The provider name |
ProviderActions | action | Action on provider EPiServer.Security.ProviderActions |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if action on provider is supported otherwise false. |
IsSupported(String, String)
Determines whether the specified provider has support for the property is on the User model.
Declaration
public virtual bool IsSupported(string providerName, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.String | providerName | The provider name |
System.String | propertyName | The property name |
Returns
Type | Description |
---|---|
System.Boolean | Returns true if the provider supports otherwise false. |
Remarks
Default we have 2 properties defined email and comment.
UpdateUser(IUIUser)
Updates the database with the information for the specified user.
Declaration
public abstract void UpdateUser(IUIUser user)
Parameters
Type | Name | Description |
---|---|---|
IUIUser | user | The user |