开发者

How to check when user authorizated and user's ID :)

protected void Login1_LoggedIn(object sender, 开发者_开发知识库EventArgs e)
{
    {
        User.SetUser(Login1.UserName // and what is user ID ?

and how to check in other module if user authenticated or not ?


To test if the user is authenticated:

HttpContext.Current.User.Identity.IsAuthenticated 

To get his username if authenticated:

HttpContext.Current.User.Identity.Name
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜