Hi, I have a web site with the following structure:
Home
- City 1
- Bar 1
- Bar 2
....
- City 2
- Bar 21
- Bar 22
- .....
The web site will have a registration form for bar owners and each bar owner can edit his own bar. For example: Bar Owner 1 can edit node Bar 1, Bar Owner 2 can edit Bar 2 and so on.. In addition on the registration form for bar owners I need to create sever additional fields as phone, address and some other information. Is it possible and what is the best approach?
when you save the node you will get an ID, save this for later.
Next use the memberservice to create a member. The documentation is a bit lacking here, but with a bit of code inspection you can do something like this.
var userService = ApplicationContext.Current.Services.UserService;
var userType = "myUserType";
var newUser = userService.CreateWithIdentity("username", "email", "password_will_be_hashed_by_umbraco", userType);
newUser.StartContentIds = NodeIdFromBefore;
userService.Save(newUser);
Thanks for the reply.
My problem actually is how to save the additional data - address, phone for the Umbraco Users. I know that this functionality is not a problem for Members, but in my case I need to work with Umbraco Users as they will edit Umbraco Nodes.
Unfortunately this does not have it in the Core. Only if you create a custom table for this. This was one of the reasons I created the User Profile Editor package. To even create something like this in the future.
In my humble opinion, only having seen limited requirements.. I would suggest you make the bar owners Members and provide a front end login which an "edit" bar page (via a surface controller!).
This will be far easier to maintain and will ensure that users don't have to learn how to use Umbraco. In my experience this will ensure they have fewer excuses in keeping their data up to date! You have more flexibility with one bar owner having multiple sites / bars / cities etc as you can just create a mapping link.
Create Users which can edit Umbraco Nodes
Hi, I have a web site with the following structure: Home - City 1 - Bar 1 - Bar 2 .... - City 2 - Bar 21 - Bar 22 - ..... The web site will have a registration form for bar owners and each bar owner can edit his own bar. For example: Bar Owner 1 can edit node Bar 1, Bar Owner 2 can edit Bar 2 and so on.. In addition on the registration form for bar owners I need to create sever additional fields as phone, address and some other information. Is it possible and what is the best approach?
Yes you can, In a nutshell:
Learn how to make a custom form in umbraco https://our.umbraco.org/documentation/reference/templating/mvc/forms
When you have validated the data, use the content service to create a node. https://our.umbraco.org/documentation/reference/management/services/contentservice
when you save the node you will get an ID, save this for later.
Next use the memberservice to create a member. The documentation is a bit lacking here, but with a bit of code inspection you can do something like this.
Thanks for the reply. My problem actually is how to save the additional data - address, phone for the Umbraco Users. I know that this functionality is not a problem for Members, but in my case I need to work with Umbraco Users as they will edit Umbraco Nodes.
Unfortunately this does not have it in the Core. Only if you create a custom table for this. This was one of the reasons I created the User Profile Editor package. To even create something like this in the future.
https://our.umbraco.org/projects/backoffice-extensions/user-profile-editor/
Hi,
In my humble opinion, only having seen limited requirements.. I would suggest you make the bar owners Members and provide a front end login which an "edit" bar page (via a surface controller!).
This will be far easier to maintain and will ensure that users don't have to learn how to use Umbraco. In my experience this will ensure they have fewer excuses in keeping their data up to date! You have more flexibility with one bar owner having multiple sites / bars / cities etc as you can just create a mapping link.
HTH
Steve
Hi, Steve, How will I know which bar is for the logged in Member?
I'd create a "bar picker" using the multi node picker and add it as a custom property to the member.
is working on a reply...