Search Results for

    Show / Hide Table of Contents
    View Source

    Class EmailUserForgotPasswordSender

    Provides functionality to send password reset emails to users who have requested a password reset.

    Inheritance
    object
    Namespace: Umbraco.Cms.Infrastructure.Security
    Assembly: Umbraco.Infrastructure.dll
    Syntax
    public class EmailUserForgotPasswordSender : IUserForgotPasswordSender

    Constructors

    View Source

    EmailUserForgotPasswordSender(IEmailSender, ILocalizedTextService, IOptionsMonitor<GlobalSettings>, IOptionsMonitor<SecuritySettings>)

    Initializes a new instance of the EmailUserForgotPasswordSender class.

    Declaration
    public EmailUserForgotPasswordSender(IEmailSender emailSender, ILocalizedTextService localizedTextService, IOptionsMonitor<GlobalSettings> globalSettings, IOptionsMonitor<SecuritySettings> securitySettings)
    Parameters
    Type Name Description
    IEmailSender emailSender

    An implementation of IEmailSender used to send emails.

    ILocalizedTextService localizedTextService

    An implementation of ILocalizedTextService for retrieving localized text resources.

    IOptionsMonitor<GlobalSettings> globalSettings

    A monitor for GlobalSettings providing application-wide configuration values.

    IOptionsMonitor<SecuritySettings> securitySettings

    A monitor for SecuritySettings providing security-related configuration values.

    Methods

    View Source

    CanSend()

    Determines whether a forgot password email can be sent, based on the current security settings and the email sender's capability to send required emails.

    Declaration
    public bool CanSend()
    Returns
    Type Description
    bool

    true if the forgot password email can be sent; otherwise, false.

    View Source

    SendForgotPassword(UserForgotPasswordMessage)

    Asynchronously sends a password reset email to the user specified in the provided message model.

    Declaration
    public Task SendForgotPassword(UserForgotPasswordMessage messageModel)
    Parameters
    Type Name Description
    UserForgotPasswordMessage messageModel

    The message model containing information about the recipient and the password reset link.

    Returns
    Type Description
    Task

    A System.Threading.Tasks.Task that represents the asynchronous send operation.

    • View Source
    In this article
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX