I was wanting to assign members to groups based on their domain.
Basically what i was thinking was creating member types that are domain suffixes. On registration if a given domain matches an existing member type assign the new member to some groups automatically. I was wondering if this sounded like a reasonable approach or could someone suggest a better approach?
what im trying to achieve is certain companies will be assigned certain member groups so if a user from that company tries to register and their email address domain matches the company domain, ensure that user is in the correct groups for that company and hence can see info relating to just those groups.
I was just trying to nut out the approach in my head.. as to how to map the relationship between a given domain and certain groups.. ie say for example i have a domain called google.com and every person who requests a membership from google.com gets added to group1 then say someone from yahoo.com registers, the yahoo.com domain gets added to group1 and group2 because it has access...
sorry i probably didn't explain what i was trying to do..
so what i was hoping to do is the admins setup a "domain" google.com and associate that value with 1 of more membership groups. and another domain might be associated with other member groups..
say for example a company google.com registers with the website with an email address [email protected] or [email protected] we validate the domain based on the domain the sys admin had put in to the admin section
i need some way to associate that domain with a list of member groups so if anyone registers from @google.com in their email address we then only show them the pages they have access to.. so every employee of google.com is automatically associated with a number of groups..
Create Members Programatically - Structure
Hi All,
I was wanting to assign members to groups based on their domain.
Basically what i was thinking was creating member types that are domain suffixes. On registration if a given domain matches an existing member type assign the new member to some groups automatically. I was wondering if this sounded like a reasonable approach or could someone suggest a better approach?
what im trying to achieve is certain companies will be assigned certain member groups so if a user from that company tries to register and their email address domain matches the company domain, ensure that user is in the correct groups for that company and hence can see info relating to just those groups.
Regards,
Tom
here is 1 way to do this programatically:
The above was coded before Roles were integrated into Umbraco. The preferred method now is probably something like:
Hi Paul thanks so much for the response...
I was just trying to nut out the approach in my head.. as to how to map the relationship between a given domain and certain groups.. ie say for example i have a domain called google.com and every person who requests a membership from google.com gets added to group1 then say someone from yahoo.com registers, the yahoo.com domain gets added to group1 and group2 because it has access...
I'm not sure how to figure out what domain you are in.
On the home page for each node you could add another property that is for the membergroup to use for that domain.
Or you could look at the umbraco.library:NiceUrlFullPath() method and see if you can use something similar to that
Hi Paul..
sorry i probably didn't explain what i was trying to do..
so what i was hoping to do is the admins setup a "domain" google.com and associate that value with 1 of more membership groups. and another domain might be associated with other member groups..
say for example a company google.com registers with the website with an email address [email protected] or [email protected] we validate the domain based on the domain the sys admin had put in to the admin section
i need some way to associate that domain with a list of member groups so if anyone registers from @google.com in their email address we then only show them the pages they have access to.. so every employee of google.com is automatically associated with a number of groups..
Hi, sorry for the delay replying - not all updates seem to be getting picked up by my RSS feed.
I thought you were setting up some multiple sites on the same umbraco instance - please ignore my response above.
You may have to set up a custom control and solution to be efficient.
However if you want to avaoid this you could set up a node structure:
Site Home
- content pages...
Email Groups
- Group1
......- @google.com
......- @gmail.com
- Group2
......- @yahoo.com
And then have your editors access starting from the Site Home node so they will never know the email groups nodes exist.
is working on a reply...