ABP 获取登录 用户ID

AbpSesstion最终是这样获取

 

var user = ((ClaimsPrincipal)Thread.CurrentPrincipal).Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier);
if (user == null || user.Value.ToInt() <= 0)
{
return;
}

posted @ 2020-06-01 03:08  evemen  阅读(673)  评论(0)    收藏  举报