Author Topic: Auto Log out timing and removing @ on login  (Read 13742 times)

Offline finch13

  • Newbie
  • *
  • Posts: 6
Auto Log out timing and removing @ on login
« on: August 11, 2006, 11:45:23 AM »
Roundcube seems to auto log out after only a couple minutes. Is it possible to edit something to keep it logged in longer? Or even forever?

Also, I tried editing the main php file on this line: $rcmail_config['username_domain'] = '';

I changed it to 'domain.com' where domain is my website address.
 
That didn't seem to work.

What I need to do to login right now is type user+domain.com.  maybe the + in place of the @ is messing it up? Any ideas?

-Dan Finch

Offline flash

  • Jr. Member
  • **
  • Posts: 49
Re: Auto Log out timing and removing @ on login
« Reply #1 on: August 11, 2006, 01:33:03 PM »
in the config file

$rcmail_config['session_lifetime']

$rcmail_config['username_domain']

Offline finch13

  • Newbie
  • *
  • Posts: 6
Re: Auto Log out timing and removing @ on login
« Reply #2 on: August 11, 2006, 02:33:20 PM »
I think I can figure out the session_lifetime one.

Username_domain, however, doesn't seem to work.

i changed to to 'mydomain.com' (in my case finch13.com) and it didn't work. Could it have to do with the fact I need to login with user+finch13.com and not user@finch13.com?

Offline flash

  • Jr. Member
  • **
  • Posts: 49
Re: Auto Log out timing and removing @ on login
« Reply #3 on: August 11, 2006, 08:53:13 PM »
That I do not know. Hopefully someone esle will come along that does :(

Offline jrmy

  • Jr. Member
  • **
  • Posts: 48
Re: Auto Log out timing and removing @ on login
« Reply #4 on: August 11, 2006, 09:15:07 PM »
Just looked at the code and it looks like the @ had been hard coded into roundcube.

First set this to your domain name.
$rcmail_config['username_domain'] = '';


Then open up roundcubemail/program/include/main.inc

Find:
Code: [Select]
/* Modify username with domain if required
   Inspired by Marco <P0L0_notspam_binware.org>
 */
 // Check if we need to add domain
 if ($CONFIG['username_domain'] && !strstr($user, '@'))
  {
  if (is_array($CONFIG['username_domain']) && isset($CONFIG['username_domain'][$host]))
   $user .= '@'.$CONFIG['username_domain'][$host];
  else if (!empty($CONFIG['username_domain']))
   $user .= '@'.$CONFIG['username_domain'];  
  }

Replace with
Code: [Select]
/* Modify username with domain if required
   Inspired by Marco
 */
 // Check if we need to add domain
 if ($CONFIG['username_domain'] && !strstr($user, '@'))
  {
  if (is_array($CONFIG['username_domain']) && isset($CONFIG['username_domain'][$host]))
   $user .= '+'.$CONFIG['username_domain'][$host];
  else if (!empty($CONFIG['username_domain']))
   $user .= '+'.$CONFIG['username_domain'];  
  }


I have no way of checking to see if that works but it's work a shot. It should be noted that since this is hard coded in only the + will work from now on. But most webhosts allow the +...

This is something I think roundcube needs to fix as the + is common enough.

Offline UPN1541

  • Jr. Member
  • **
  • Posts: 12
Re: Auto Log out timing and removing @ on login
« Reply #5 on: August 12, 2006, 07:59:11 PM »
Quote from: finch13
Roundcube seems to auto log out after only a couple minutes. Is it possible to edit something to keep it logged in longer? Or even forever?

Okay... I'm getting the opposite! My two RoundCube beta 2 installs (same host server) won't auto log out... EVER.

I installed a 3rd beta 2 and it wont log out either, HOWEVER I was composing an email, it popped up as auto save to drafts, then when I hit send it said my session was invalid. I can't reproduce it. I cleared my browser cache, deleted cookies, tried three different browsers: Safari, Opera, Firefox.

I have main.inc.php configured:

// session lifetime in minutes
$rcmail_config['session_lifetime'] = 10;

Any ideas?

Offline UPN1541

  • Jr. Member
  • **
  • Posts: 12
Re: Auto Log out timing and removing @ on login
« Reply #6 on: August 14, 2006, 02:34:52 PM »
Any ideas as to why my installs of beta 2 wont auto log out or expire the session? Where as beta 1 would...

Offline jrmy

  • Jr. Member
  • **
  • Posts: 48
Re: Auto Log out timing and removing @ on login
« Reply #7 on: August 14, 2006, 02:41:05 PM »
I am not exactly sure but I am thinking the session time out does not apply to the auto logout. Since roundcube checks your mail every so often it would keep the session alive. I am thinking the auto logout is a seperate item roundcube may not have.

Offline finch13

  • Newbie
  • *
  • Posts: 6
Re: Auto Log out timing and removing @ on login
« Reply #8 on: August 16, 2006, 01:39:23 AM »
WorkS! jrmy you rule!