diff options
-rw-r--r-- | includes/theme.inc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/theme.inc b/includes/theme.inc index 2f07c2633..e6c1f596d 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -2105,9 +2105,8 @@ function _template_preprocess_default_variables() { 'logged_in' => FALSE, ); - // user_access() does not exist when the database is not available because - // user.module has not been included. - if (function_exists('user_access')) { + // The user object has no uid property when the database does not exist. + if (isset($user->uid)) { $variables['is_admin'] = user_access('access administration pages'); $variables['logged_in'] = ($user->uid > 0); } |