summaryrefslogtreecommitdiff
path: root/program/include/rcube_imap.php
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_imap.php')
-rw-r--r--program/include/rcube_imap.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 00a4158fe..57b85c34e 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3742,9 +3742,9 @@ class rcube_imap extends rcube_storage
{
if ($this->messages_caching && !$this->mcache) {
$rcube = rcube::get_instance();
- if ($dbh = $rcube->get_dbh()) {
+ if (($dbh = $rcube->get_dbh()) && ($userid = $rcube->get_user_id())) {
$this->mcache = new rcube_imap_cache(
- $dbh, $this, $rcube->get_user_id(), $this->options['skip_deleted']);
+ $dbh, $this, $userid, $this->options['skip_deleted']);
}
}