Last post Jul 21, 2015 04:51 PM by duanalista
Jul 20, 2015 08:13 AM|duanalista|LINK
I would like some help with Identity., please Here, the user account is by Company, I made the customization of ApplicationUser putting CompanyID field, and the field in AspNetUsers table. Everything working perfect. But now at login time would have to
be checked username, password and Company. I have, for example, user "sam" on Company "01" and user "sam" on Company "02". The company I get by parameter in the querystring, and the login screen is still only the UserName and Password fields. It is to do this?
Where do I start? Thanks for help.
Jul 20, 2015 04:47 PM|mostafasydney|LINK
Welcome to the forum and thank you for the post.
You need to customize the Identity database, controllers actions, viewmodels in order to achieve the goal. You can easily be able to add new property to the AspNetUsers table. Please following the following posts:
Hope this will help.
Jul 20, 2015 10:01 PM|Li Wang|LINK
Each user should have
a unique identifier. If there are multi "sam" in your system, It's not
recommend using sam
as login name.
You could assign a user number to
each user and use the user num and password to login.
I have, for example, user "sam" on Company "01" and user "sam" on Company "02".
Jul 21, 2015 04:51 PM|duanalista|LINK
Thanks Mostafa, i'll read these articles and study them. The only difference is my application are WebForms, not MVC.
It'a a good idea Li, thanks. I'll study this.