掲示板

Extending Forgot Password Functionality

11年前 に Ikaika Correa によって更新されました。

Extending Forgot Password Functionality

New Member 投稿: 2 参加年月日: 12/10/03 最新の投稿
Anyone have any clue how to allow a user to input either username or email address to request a forgotten password? Currently, you can either set it to one or the other. Let me know if you have any ideas.
thumbnail
11年前 に Vitaliy Koshelenko によって更新されました。

RE: Extending Forgot Password Functionality

Expert 投稿: 319 参加年月日: 11/03/25 最新の投稿
Hi!

You can patch ForgotPasswordAction class, method protected User getUser(ActionRequest actionRequest).
There you can check if incoming parameter ('screenName' or 'emailAddress') contains '@' symbol. If it does - process as email (getUserByEmailAddress), else - as screenName (getUserByScreenName).

Vitaliy