Reputation: 2704
I have a web application that is kind of a hub for different companies. Each one of these companies will be allowed to manage (create/delete) its own user.
If there are thousands of companies using the application, they're bound to create users with the same Username as other companies. Now, currently 'company a' cannot have the same username as 'company b' even though neither company knows the other even exists.
Is it possible with SqlMembershipProvider to allow for multiple usernames based on an application specific criteria (in the example above it would be the company name or company id)? And if so, is there an example available online on how I can accomplish this?
Any help would be appreciated. Thanks!
Upvotes: 2
Views: 990
Reputation: 29664
Two thoughts:
ApplicationName
base on the company; you can do this on SessionStart
or some other such event.Upvotes: 1
Reputation: 15673
I believe this works if you use the other "username" parameter -- the application name. Set each company up with their own application name for users and you should be able to make usernames unique within each company.
Upvotes: 1