Base solution for your next web application
Open Closed

MVC 5x & JQuery: How do I get current logged in user id in a controller action? #7365


User avatar
0
jaheath created

I'm trying to find an example of how to get the current logged in users id, similiar to what HttpContext.Current.User.Identity.GetUserId() does. I'd rather not recreate the wheel if the functionality already exists in Zero. For this example, let's assume we are talking about getting the user id (not the name) in a controller action. I'm looking thru the documentation, but I've not run across the info yet.

Thanks for your help!


1 Answer(s)
  • User Avatar
    0
    jaheath created

    And no sooner do I post this, do I find the info. I was thinking there was an Zero version of AbpSession.UserId that I should use.

    Thanks!