Notice error

darcs-hash:20080720094917-533db-386e12dbeabcfb9bc74cdce11e6bc197964929b7.gz
This commit is contained in:
Mike Cochrane 2008-07-20 05:49:17 -04:00
parent fdfb806801
commit 92e90ee636

View File

@ -600,7 +600,7 @@ function common_forgetme() {
function common_current_user() {
if (isset($_REQUEST[session_name()]) || (isset($_SESSION['userid']) && $_SESSION['userid'])) {
common_ensure_session();
$id = $_SESSION['userid'];
$id = isset($_SESSION['userid']) ? $_SESSION['userid'] : false;
if ($id) {
# note: this should cache
$user = User::staticGet($id);