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
f69437de
Commit
f69437de
authored
Nov 02, 2004
by
Steven Wittens
Browse files
#12363
: Bug in user_access() with uid 1 and $account parameter.
parent
29b32eff
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/user.module
View file @
f69437de
...
...
@@ -307,15 +307,15 @@ function user_access($string, $account = NULL) {
global
$user
;
static
$perm
=
array
();
if
(
is_null
(
$account
))
{
$account
=
$user
;
}
// User #1 has all privileges:
if
(
$user
->
uid
==
1
)
{
return
1
;
}
if
(
is_null
(
$account
))
{
$account
=
$user
;
}
// To reduce the number of SQL queries, we cache the user's permissions
// in a static variable.
if
(
!
isset
(
$perm
[
$account
->
uid
]))
{
...
...
modules/user/user.module
View file @
f69437de
...
...
@@ -307,15 +307,15 @@ function user_access($string, $account = NULL) {
global
$user
;
static
$perm
=
array
();
if
(
is_null
(
$account
))
{
$account
=
$user
;
}
// User #1 has all privileges:
if
(
$user
->
uid
==
1
)
{
return
1
;
}
if
(
is_null
(
$account
))
{
$account
=
$user
;
}
// To reduce the number of SQL queries, we cache the user's permissions
// in a static variable.
if
(
!
isset
(
$perm
[
$account
->
uid
]))
{
...
...
Write
Preview
Markdown
is supported
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