Session Timeout

71 views
Skip to first unread message

Tinn

unread,
May 22, 2013, 4:43:32 PM5/22/13
to uf...@googlegroups.com
I was wondering what facilities exist for login/session timeouts in uFlex?

Thanks!

Pablo Tejada

unread,
May 22, 2013, 5:28:25 PM5/22/13
to uf...@googlegroups.com

Hi,

What do you mean by session timeouts? To logout the user is inactive for a certain amount of time?

On May 22, 2013 4:43 PM, "Tinn" <nitin.r...@gmail.com> wrote:
I was wondering what facilities exist for login/session timeouts in uFlex?

Thanks!

--
Project's home page http://crusthq.com/projects/uFlex/
---
You received this message because you are subscribed to the Google Groups "uFlex" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uflex+un...@googlegroups.com.
To post to this group, send email to uf...@googlegroups.com.
Visit this group at http://groups.google.com/group/uflex?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Nitin Agrahara Ravikumar

unread,
May 23, 2013, 12:04:28 AM5/23/13
to uf...@googlegroups.com
Yeah, I have this situation where I need to logout the user after a certain duration of inactivity.
You received this message because you are subscribed to a topic in the Google Groups "uFlex" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/uflex/TpS3poCFB_Q/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to uflex+un...@googlegroups.com.

Pablo

unread,
May 23, 2013, 7:37:53 PM5/23/13
to uf...@googlegroups.com
There is nothing really built-in to facilitate this, but
I think this would be more properly implemented in the client side with JavaScript. For example:

setInterval(function(){
  /*
   * Check for user interactivity every 10 min
   * If inactive send an ajax request to logout user
   */
  
}, 10 * 60 * 1000);

Or in PHP you could save the timestamp of the user's requests and compare it with a the last stored timestamp. For example:

if($user->session("lastSeen")){
  $lastSeen = $user->session("lastSeen");
  //10 minutes in seconds
  $timeout = 60 * 10;
  
  if(time() - $timeout > $lastSeen){
  
    //User has already timed out, logout or whatever
    
  }else{
  
    //User is still within the timeout range
    
  }
}else{

  //First request, save timestamp
  $user->session("lastSeen", time());
  
}

On Thursday, May 23, 2013 12:04:28 AM UTC-4, Tinn wrote:
Yeah, I have this situation where I need to logout the user after a certain duration of inactivity.

On Wednesday, May 22, 2013, Pablo Tejada wrote:

Hi,

What do you mean by session timeouts? To logout the user is inactive for a certain amount of time?

On May 22, 2013 4:43 PM, "Tinn" <nitin.r...@gmail.com> wrote:
I was wondering what facilities exist for login/session timeouts in uFlex?

Thanks!

--
Project's home page http://crusthq.com/projects/uFlex/
---
You received this message because you are subscribed to the Google Groups "uFlex" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uflex+unsubscribe@googlegroups.com.

To post to this group, send email to uf...@googlegroups.com.
Visit this group at http://groups.google.com/group/uflex?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
Project's home page http://crusthq.com/projects/uFlex/
---
You received this message because you are subscribed to a topic in the Google Groups "uFlex" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/uflex/TpS3poCFB_Q/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to uflex+unsubscribe@googlegroups.com.

Nitin Agrahara Ravikumar

unread,
May 24, 2013, 2:35:09 PM5/24/13
to uf...@googlegroups.com

The JS idea sound great!
Thank you very much Pablo..

To unsubscribe from this group and all its topics, send an email to uflex+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages