Roundcube Community Forum

 

Remember me doesn't woirk anymore

Started by renderwarrior, December 07, 2009, 12:37:39 PM

Previous topic - Next topic

renderwarrior

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!!!

rosali

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

capp

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.