Results 1 to 9 of 9

Thread: Inactivity timeout/logout

  1. #1
    wriggly40 is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    14

    Default Inactivity timeout/logout

    Hi,

    Is it possible to set a logout/timeout so that Sugar will return to the login page if the user is inactive for 15 mins?

    I have looked at the possibilty in adding a javascript to do this, however I have not had much luck in where to place the javascript.

    Is it at all possible to do this? or has anyone got any ideas on where I could place the javascript if it is not possible to do this within sugar itself.

    Thanks.

  2. #2
    Markku's Avatar
    Markku is offline Sugar Community Member
    Join Date
    Nov 2004
    Location
    Helsinki
    Posts
    910

    Default Re: Inactivity timeout/logout

    Sugar relies on php.ini session timeout setting (session.gc-maxlifetime). Session expires based on that value so modify session.gc_maxlifetime according your needs.

    More information available here:
    http://de3.php.net/manual/en/session...gc-maxlifetime

  3. #3
    wriggly40 is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    14

    Default Re: Inactivity timeout/logout

    Hi,

    Thank you for the reply.

    I tried it but didnt work so I have fudged it by changing some PHP files.

    If anyone needs to take a look how it was done I can post the code somewhere.

  4. #4
    aigalli is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    23

    Default Re: Inactivity timeout/logout

    Hi,

    I'm experiencing problems with user sessions not timing out having specified the session.gc_maxlifetime parameter. I would appreciate your feedback on how you overcame this problem.

    Thanks

  5. #5
    AChesney is offline Member
    Join Date
    Jul 2008
    Posts
    9

    Default Re: Inactivity timeout/logout

    We are experiencing a similar issue. Please post the code.

    Thanks much!
    Amy

  6. #6
    bickart68 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    111

    Default Re: Inactivity timeout/logout

    I have code that is NON-Upgrade Safe that will popup a warning message at a preset interval and then. If the user doesn't press the OK button. They are logged of and sent to the login screen.

    If you are interested...I can post the specifics.

  7. #7
    bullyboy1 is offline Junior Member
    Join Date
    Feb 2008
    Posts
    2

    Default Re: Inactivity timeout/logout

    Yes please post the code. Many user complaints about getting logged out even after setting the ini file to 4 hours.

  8. #8
    antoniocal is offline Sugar Community Member
    Join Date
    Oct 2007
    Posts
    59

    Default Re: Inactivity timeout/logout

    I have the same issue but i have a workaround.
    If you run sugar on linux you can put a cron with this line (just put crontab -e in command line and search a "vi" survival guide to edit )
    * * * * * find /tmp -cmin +20 -name 'sess_*' -user daemon | xargs rm -f

    where
    /tmp is the dir where the session files resides (you can search in your php.ini the location on your server)
    +20 is 20min timeout
    "sess_" are the files in /tmo that belongs to sessions.
    daemon is the user taht runs the apache server

    This works fine for me.
    good look

  9. #9
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Inactivity timeout/logout

    If you are using SugarCRM 5.2 you can use the table tracker to identify users which does not interact with the system for some time.
    This table has the field session_id which represent the authenticated session for this user.
    The file where the session is saved is: $sugar_config['session_dir']/sess_{tracker.session_id}
    If you delete this file the user is automatically disconnected.

    You can create a scheduled task to scan the tracker table, identify lazy users and kill his sessions.

    Kind regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Account Inactivity Report
    By rkhanna in forum Help
    Replies: 0
    Last Post: 2006-06-02, 10:52 PM
  2. Inactivity Timeout
    By ncrush in forum Help
    Replies: 1
    Last Post: 2006-05-23, 10:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •