Search code examples
ploneplone-4.x

Plone: Recover password by email instead of username


Is there a simple way to set recovering account's password to work with email instead of user name?

Or I must override mail_password_form template and it's related script?

(Our users seems to forget user ids, too...)


Solution

  • It seems Plone already has this case implemented in mail_password_form.pt.

                <label i18n:translate="label_my_user_name_is"
                       tal:condition="not:use_email_as_login"
                       for="userid">
                    My user name is
                </label>
                <label i18n:translate="label_my_email_address_is"
                       tal:condition="use_email_as_login"
                       for="userid">
                  My email address is
                </label>
    

    In Site setup -> Security (@@security-controlpanel) check: Use email address as login name (Allows new users to login with their email address instead of specifying a separate login name. Existing users can still login with their user id until you use the @@migrate-to-emaillogin page as a site admin. It is recommended to do that immediately after changing this option.)

    (Working for simple accounts, but not useful in my case - ldap accounts.)