Closed aghili371 closed 4 months ago
You can already change the view by copying it in your theme (or module) in the Views\OrchardCore.Users\Registration
folder.
Then there is an interface in the OrchardCore.Users.Abstractions
that is named IRegistrationFormEvents
that will let you execute some custom code when the form is validated and the user is created. You will need to resolve the current http request and access the form by yourself. Also you will need to query the user from the user store and then update its data (or store it somewhere else). If you use the User
class it has a Properties
object that you can use to store custom data.
Maybe we should add more properties to these events to simplify your work but it looks totally doable.
Let us know how it goes.
For my own reference, this is how it's done in WP: https://codex.wordpress.org/Customizing_the_Registration_Form
I think this issue will also help you: https://github.com/OrchardCMS/OrchardCore/issues/3353
this project is good for redesign the user pages. ModernBusiness.OC.RazorPages
just I have a problem, how I can tell the page to use the default layout in my theme ("Layout.liquid")?
i used "properties " to save extra fields, it works fine but when i want to have listed and edit the information, it was difficult to use. i created new content type "user info" and i added the field here.
the problem is how to connect this content type and "user register info".
i you set an extra field in the identity of the user to get the user id, it will be great.
i can get the username by : User.Identity.Name;
do you have any field to get userid?
I want to have register Page With Extra field like(name, address, phone,...) i should get a clone from OrchardCore.Users Module and redesign controller and views or you have a better solution?