How do i check if any user not logged in?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/11/2009 7:17:22 AM
Gravatar
Total Posts 2

How do i check if any user not logged in?

How do i check if any user not logged in?

 

8/11/2009 11:15:43 AM
Gravatar
Total Posts 18439

Re: How do i check if any user not logged in?

You can determine if the current request is being made by an authenticated user or not using if(Request.IsAuthenticated)

The web is not a stateful environment, there is no easy way to tell whether particular users are logged in or not except in the context of a web request.

We do have a feature in the Site Statistics that tells who is online but it is not precise, it assumes a user is online if he has made a request in the past 20 minutes which is the default session timeout. 

Hope it helps,

Joe

8/11/2009 12:14:37 PM
Gravatar
Total Posts 2

Re: How do i check if any user not logged in?

Hi,

If no user is logged in , how do i check for it ?

8/11/2009 12:17:28 PM
Gravatar
Total Posts 18439

Re: How do i check if any user not logged in?

You need to learn C#, then you would know the not operator is !

so

if(!Request.IsAuthenticated)
{

Code to run if the user is not authenticated...

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.