Roundcube Community Forum

Release Support => Pending Issues => Topic started by: sfreemanRCM on May 31, 2008, 01:39:34 PM

Title: Log Out Button - Where Is It? Which File please?
Post by: sfreemanRCM on May 31, 2008, 01:39:34 PM
Can anyone tell me where the code is for the Log Out button???? Which file?
Title: Log Out Button - Where Is It? Which File please?
Post by: sfreemanRCM on June 05, 2008, 12:59:44 PM
bump - come on - someone has to know this  ---
Title: Log Out Button - Where Is It? Which File please?
Post by: rosali on June 05, 2008, 02:19:32 PM
Is it 'skins/[your skin]/includes/taskbar.html' what you are looking for?

-Roland
Title: Log Out Button - Where Is It? Which File please?
Post by: sfreemanRCM on June 05, 2008, 02:58:59 PM
thanks, roland---
Title: Log Out Button - Where Is It? Which File please?
Post by: sfreemanRCM on June 05, 2008, 05:28:56 PM
Quote from: rosali;12412Is it 'skins/[your skin]/includes/taskbar.html' what you are looking for?

-Roland

No, that's not it--- I would like to try to mod the code for the log out ----
Title: Log Out Button - Where Is It? Which File please?
Post by: rosali on June 06, 2008, 12:42:42 AM
Latest SVN release:

The functions are triggered in index.php ...

  $RCMAIL->logout_actions();
  $RCMAIL->kill_session();

The functions itself are located in the rcmail class (/program/include/rcmail.php) ...


  /**
   * Destroy session data and remove cookie
   */
  public function kill_session()
  {
    $user_prefs = $this->user->get_prefs();
   
    if ((isset($_SESSION['sort_col']) && $_SESSION['sort_col'] != $user_prefs['message_sort_col']) ||
        (isset($_SESSION['sort_order']) && $_SESSION['sort_order'] != $user_prefs['message_sort_order'])) {
      $this->user->save_prefs(array('message_sort_col' => $_SESSION['sort_col'], 'message_sort_order' => $_SESSION['sort_order']));
    }

    $_SESSION = array('language' => $USER->language, 'auth_time' => time(), 'temp' => true);
    setcookie('sessauth', '-del-', time() - 60);
    $this->user->reset();
  }


  /**
   * Do server side actions on logout
   */
  public function logout_actions()
  {
    $config = $this->config->all();
   
    // on logout action we're not connected to imap server  
    if (($config['logout_purge'] && !empty($config['trash_mbox'])) || $config['logout_expunge']) {
      if (!$this->authenticate_session())
        return;

      $this->imap_init(true);
    }

    if ($config['logout_purge'] && !empty($config['trash_mbox'])) {
      $this->imap->clear_mailbox($config['trash_mbox']);
    }

    if ($config['logout_expunge']) {
      $this->imap->expunge('INBOX');
    }
  }


-Roland