Author Topic: Remember me doesn't woirk anymore  (Read 6128 times)

Offline renderwarrior

  • Newbie
  • *
  • Posts: 1
Remember me doesn't woirk anymore
« on: December 07, 2009, 12:37:39 PM »
Hi!
I'm using Roundcube + the MyRoundCube plugins + hMailserver + win2008 server Web Edition.
I'm using the "remember_me" plugin, but since the v. 1.1 it doesn't work anymore (it seems it doesn't create the cookie).
I used the v.1.0 and it works nice (hoping it will not break anything)

Can you help me please with the v.1.1?
Thanks!!

PS: GREAT PIECE OF SOFTWARE!!!

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
Remember me doesn't woirk anymore
« Reply #1 on: December 08, 2009, 09:55:52 AM »
Found the bug ... update the following piece of code:

  
function login_after($args) {
    if ((
$_POST['_rememberme'] == 1) && !empty($_POST['_user']) &&  !empty($_POST['_pass'])) {
       
setcookie ('rememberme_user',$this->encode(trim($_POST['_user'])),time()+60*60*24*365);
       
setcookie ('rememberme_pass',$this->encode(trim($_POST['_pass'])),time()+60*60*24*365);
       
setcookie ('rememberme_host',$this->encode($_SESSION['imap_host']),time()+60*60*24*365);
       
setcookie ('rememberme_checked',1,time()+60*60*24*365);
    }
    return 
$args;
  }
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

capp

  • Guest
Remember me doesn't woirk anymore
« Reply #2 on: December 15, 2009, 07:44:54 PM »
Seems as remember_me does not work for hosts with SSL connection, as $host does not include the SSL parameters.

If I understand it correct, you have to save $imap_ssl and $imap_port in cookies as well to get your session resumed.