Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
7b38b291
Commit
7b38b291
authored
Dec 07, 2007
by
Gábor Hojtsy
Browse files
#198440
by davideads: provide the user object to all templates
parent
cd8afc2b
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/theme.inc
View file @
7b38b291
...
...
@@ -1641,6 +1641,8 @@ function template_preprocess(&$variables, $hook) {
$variables
[
'is_front'
]
=
drupal_is_front_page
();
// Tell all templates by which kind of user they're viewed.
$variables
[
'logged_in'
]
=
(
$user
->
uid
>
0
);
// Provide user object to all templates
$variables
[
'user'
]
=
$user
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment