Access to AspNetUsers table from outside AccountController

Sep 30 2018 2:15 PM
Hi
 
I have a MVC projekt running and I'm using Identity. My problem is that I would like to use the email and phonenumber of users throughout the application, but there I cannot find an easy way to access these data (except for the signed in user). I need to send SMS and email to one user o behalf of another user, so I need some kind of lookup function.
 
I have the UserId stored in a different table so I have that, but need access. 
 
What would be best practice to gain access to these information from e.g. a server layer? Should I store the information double so I have it in my own "Users" table? - and how would I ensure that the information is updated when AspNetUsers is?
 
Thanks in advance for any help
 
/Søren

Answers (1)