Changeset a2f896b in github


Ignore:
Timestamp:
Apr 20, 2012 7:52:43 AM (13 months ago)
Author:
alecpl <alec@…>
Branches:
master, HEAD, courier-fix, dev-browser-capabilities, pdo
Children:
b1b808d
Parents:
6c95b3e4
Message:
  • Use user object instead of session, if possible, to get user ID when creating cache object
File:
1 edited

Legend:

Unmodified
Added
Removed
  • program/include/rcube.php

    r5d66a4b ra2f896b  
    245245  { 
    246246    if (!isset($this->caches[$name])) { 
    247       $this->caches[$name] = new rcube_cache($type, $_SESSION['user_id'], $name, $ttl, $packed); 
     247      $userid = $this->get_user_id(); 
     248      $this->caches[$name] = new rcube_cache($type, $userid, $name, $ttl, $packed); 
    248249    } 
    249250 
     
    11721173            return $this->user->ID; 
    11731174        } 
     1175        else if (isset($_SESSION['user_id'])) { 
     1176            return $_SESSION['user_id']; 
     1177        } 
    11741178 
    11751179        return null; 
Note: See TracChangeset for help on using the changeset viewer.