+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Custom forgot password control for email

Custom forgot password control for email

8 posts, 0 answered
  1. Amanda Shafer
    Amanda Shafer avatar
    198 posts
    Registered:
    12 Oct 2012
    18 Jul 2011
    Link to this post
    Hello,
     I was wondering if anyone has created a custom login control that allows visitors to user either their username or email address to reset the password. If so, would you be willing to share the control?

    I've had users complain that they can't remember their logins in order to reset the password.
  2. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    24 Mar 2017
    19 Jul 2011
    Link to this post
    Hi Amanda Shafer,

    The login control that comes out of the box with Sitefinity offers similar functionality - when you click on the Forgot your password  link located below the Login control you can fill in your username and a reset password will be sent to you on the email you have used when registering that user. The only condition that needs to be set in order to make this work is to have the SMTP settings under Administration->Settings->Advanced->System->SMTP configured properly, so Sitefinity can send emails. Just to make sure we're talking about the same thing, I am attaching a short video demonstrating how the stock functionality works, please do not hesitate to let us know if this is not the one you need. Thanks in advance.

    Kind regards,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Amanda Shafer
    Amanda Shafer avatar
    198 posts
    Registered:
    12 Oct 2012
    19 Jul 2011
    Link to this post
    Hi Boyan,

    Thank you for the reply. I'm looking for a control that will allow the user to put in their email, instead of the username as is the default for the built-in control. Our members have trouble remembering their usernames in order to reset the password.

    Thanks,
    Amanda
  4. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    24 Mar 2017
    26 Jul 2011
    Link to this post
    Hello Amanda Shafer,

    Thank you very much for the clarification. I have researched the control's functionality, and implementing the desired scenario would not be that trivial, as it will require a custom control that inherits from PasswordRecoveryForm and adding a custom logic that looks for a user by email, not username. What I can offer you as a workaround is to use the "contact administrator' functionality the Password recovery form is offering, where your users can sedn the website administrator an email with their email/username and he/she can recover their login data and send it back to them. Another option, would be to simply copy the email as username as this will surely alleviate the problem with users forgetting their username, and they will be able to use the out of the box password recovery functionality.

    Greetings,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Michael
    Michael avatar
    2 posts
    Registered:
    13 Jun 2010
    11 Aug 2011
    Link to this post
    Related to the SMTP settings, how can I force the forgot password functionality to authenticate via SMTP?  From server email logs, it looks as though Sitefinity only passes the custom email specified for the password recovery and no password.  This means the server needs to allow for anonymous authentication, and this is very bad.  Am I missing something?  If so, how can I go about forcing the forgot password email to provide a password?

    Thanks!
  6. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    24 Mar 2017
    12 Aug 2011
    Link to this post
    Hi Michael,

    There's a required element that needs to be present in the recoveryMailBody value, in order for this functionality to work. Can you please make sure that your recoveryMailBody(please find attached a screenshot demonstrating the location of these settings) contains:

    <%\\s*Password\\s*%>

    element is included, as it is the only mechanism for the body to include the recovered password. Please try this functionality and let me know if any problems persist, or this is not the exact functionality you want to achieve.

    Kind regards,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Michael
    Michael avatar
    2 posts
    Registered:
    13 Jun 2010
    16 Aug 2011
    Link to this post
    Hi Boyan,

    Thank you for the response.  I re-read my post, and I believe I wasn't too clear, my apologies.  My issue is not actually recovering of the actual password, but forcing the email that is generated by Sitefinity to authenticate on outgoing to the SMTP server:

    Example:
    email from: passwordrecovery@mydomain.com
    password: <no password specified>
    SMTP: can't send mail, passwordrecovery@mydomain.com must provide password.
  8. Boyan Barnev
    Boyan Barnev avatar
    1429 posts
    Registered:
    24 Mar 2017
    19 Aug 2011
    Link to this post
    Hi Michael,

    I hope I'm not getting you wrong, but this functionality is supported out of the box. If you haven't configured Sitefinity's SMTP settings, the system will not be able to authenticate properly on the SMTP server, and the message will not pass through. Please take a look at this article form our online documentation, I believe you might find it useful.

    Kind regards,
    Boyan Barnev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
8 posts, 0 answered