views:

43

answers:

2

Hi, is there anyway I could create a function that receives and username and the function returns if the user is currently logged in into the application?

+1  A: 

Have a look at

this.Page.User.Identity
citronas
A: 
Session.Add("CurrentUser", currentUser);

Add the user as a session and you should be good. This is for ASP.NET C#, you might want to elaborate more on what you want to do.

_currentUser = ([].User)Session["CurrentUser"];

if (_currentUser != null)
{
}
lighthazard