I often asked a question about a known username and how to get a UserId accordingly. How about a different way?
For some reason, I have a UserId, but I don't want to include the aspnet_User table in my data entities. Is there a way to get the username without querying the aspnet_User table?
MembershipUser user = Membership.GetUser(); if (user != null) string name = user.UserName;
Internally, this will result in access to the ASP.NET user table. There is no way to avoid this.
Source: https://habr.com/ru/post/1335788/More articles:Threadsafe way to expose keySet () - javaCreating a user registration page using MongoEngine - authenticationredirect wget header output - redirectRead the time series table using read.zoo - rDigital file jar file - javaSyntax Highlighting themes for Monodevelop - themesjQuery - select elements that are not included in the identifier - jqueryFind the latest file in a directory without reading its contents - cGood idea / bad idea? Using MySQL RAND () outside of a small set of subquery results? - phpDo I need to have at all? - htmlAll Articles