I am using the snippet 'Register Member' partial view macro which allows me to have visitors register. What I really need is for those who register to be put into a Group automatically so now they can access a restricted page/section of the site.
This seems a fundamental part of role based protection - for a visitor to register and then get access to a certain area of the site.
For the life of me I can't see how to do it. I can see I can set a custom member type alias, but that doesn't help my situation?
When you say extend the current code... my Umbraco website is hosted by pipeten.co.uk - so I only have access to files via FTP and the back-end CMS. Is there a way for me to achieve this or am I stuck?
Members - default Group on registration
Hello,
I am using the snippet 'Register Member' partial view macro which allows me to have visitors register. What I really need is for those who register to be put into a Group automatically so now they can access a restricted page/section of the site.
This seems a fundamental part of role based protection - for a visitor to register and then get access to a certain area of the site.
For the life of me I can't see how to do it. I can see I can set a custom member type alias, but that doesn't help my situation?
Any help would be much appreciated!
Thanks
Dan
Hi Dan
It's been a while since I've had a look at this myself but I think you should be able to extend the current code using the AddRole() method from the member service API here https://our.umbraco.org/documentation/reference/management/services/memberservice
Hope this helps.
/Jan
Thanks for your reply!
When you say extend the current code... my Umbraco website is hosted by pipeten.co.uk - so I only have access to files via FTP and the back-end CMS. Is there a way for me to achieve this or am I stuck?
Cheers!
Dan
Hi Dan,
Are you looking for something like this?
After you have created a member, you can then assign them a role as above.
Make sure you have created a member group in the Members section so you can assign the role to your members.
/B.
Hi Bijesh - thanks for the reply.
So looking at the "Register Member" snippet in Partial View Macros, would I put this code in there? If so.. where?
Else where would this code go?
Cheers!
Dan
Hi Dan
There was another thread requesting this sort of functionality to which I've posted a reply, hope it helps.
https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/64185-Assign-new-members-to-member-group-upon-registration#comment-244173
Regards
is working on a reply...