Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c49207d9
Commit
c49207d9
authored
Mar 06, 2012
by
Jennifer Hodgdon
Browse files
Issue
#1469758
by chertzog: Fix typo in sample hook_node_grants_alter function
parent
efc46895
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/node/node.api.php
View file @
c49207d9
...
...
@@ -383,7 +383,7 @@ function hook_node_grants_alter(&$grants, $account, $op) {
if
(
$op
!=
'view'
&&
!
empty
(
$restricted
))
{
// Now check the roles for this account against the restrictions.
foreach
(
$restricted
as
$role_id
)
{
if
(
isset
(
$
user
->
roles
[
$role_id
]))
{
if
(
isset
(
$
account
->
roles
[
$role_id
]))
{
$grants
=
array
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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