c# - Get current user id in ASP.NET Identity 2.0 -


i switched on using new 2.0 version of identity framework. in 1.0 user object using manager.findbyidasync(user.identity.getuserid()). getuserid() method not seem exists in 2.0.

now can figure out use manager.findbyemailasync(user.identity.name) references username field in users table. in application set same email field.

i can see causing issues down road when needs update email. there way current logged in user object based off unchanging value (such id field) in identity 2.0 framework?

getuserid() extension method on iidentity , in microsoft.aspnet.identity.identityextensions. make sure have added namespace using microsoft.aspnet.identity;.


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -