سؤال

I'm implementing a signup system by using UsernamePasswordProvider. I want a user to be able to signup directly instead of firstly putting his/her email and waiting for a token. Moreover, I want to modify the signup form by adding/deleting some input fields. However, I can't find any document mentioned how to achieve these requirements. Any help would be appreciated.

هل كانت مفيدة؟

المحلول

The current stable version - 2.1.3 as of this writing - does not make it easy to customize the flow. With the latest changes in master you can override the built in registration controller and add the changes you need.

To accomplish what you want the best would be to not include the default registration routes and add your own that point to your custom controllers directly.

Keep in mind that the default flow prevents leaking information about the user base. If you make your users fill a form and they enter an existing email address you will have to show an error saying the account exists. That can give information to a potential attacker to target specific emails.

نصائح أخرى

You should create custom views that extend TemplatesPlugin (or ViewsPlugin, in the newest version). This information is explained in securesocial website.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top