alecpl
2012-01-03 fdff34093d479f1a9cb98107b68eb9137278b181
index.php
@@ -2,7 +2,7 @@
/*
 +-------------------------------------------------------------------------+
 | Roundcube Webmail IMAP Client                                           |
 | Version 0.7-svn                                                         |
 | Version 0.8-svn                                                         |
 |                                                                         |
 | Copyright (C) 2005-2011, The Roundcube Dev Team                         |
 |                                                                         |
@@ -97,8 +97,7 @@
    $OUTPUT->show_message("cookiesdisabled", 'warning');
  }
  else if ($auth['valid'] && !$auth['abort'] &&
        !empty($auth['host']) && !empty($auth['user']) &&
        $RCMAIL->login($auth['user'], $auth['pass'], $auth['host'])
    $RCMAIL->login($auth['user'], $auth['pass'], $auth['host'])
  ) {
    // create new session ID, don't destroy the current session
    // it was destroyed already by $RCMAIL->kill_session() above
@@ -129,7 +128,7 @@
    $OUTPUT->redirect($redir);
  }
  else {
    $error_code = is_object($IMAP) ? $IMAP->get_error_code() : -1;
    $error_code = (isset($RCMAIL->imap) && is_object($RCMAIL->imap)) ? $RCMAIL->imap->get_error_code() : 1;
    $OUTPUT->show_message($error_code < -1 ? 'imaperror' : (!$auth['valid'] ? 'invalidrequest' : 'loginfailed'), 'warning');
    $RCMAIL->plugins->exec_hook('login_failed', array(