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
61c8e5b0
Commit
61c8e5b0
authored
Oct 25, 2006
by
Dries
Browse files
- Patch
#88474
by chx, webernet, etc: fixed 'access denied' problem
parent
860b79b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/user/user.module
View file @
61c8e5b0
...
...
@@ -689,13 +689,17 @@ function user_menu($may_cache) {
$view_access
=
user_access
(
'access user profiles'
);
if
(
$may_cache
)
{
$items
[]
=
array
(
'path'
=>
'user'
,
'title'
=>
t
(
'User account'
),
'callback'
=>
'drupal_get_form'
,
'callback arguments'
=>
array
(
'user_login'
),
'access'
=>
TRUE
,
'type'
=>
MENU_CALLBACK
);
$items
[]
=
array
(
'path'
=>
'user'
,
'title'
=>
t
(
'user account'
),
'callback'
=>
'drupal_get_form'
,
'callback arguments'
=>
array
(
'user_login'
),
'access'
=>
!
$user
->
uid
,
'type'
=>
MENU_CALLBACK
);
$items
[]
=
array
(
'path'
=>
'user/autocomplete'
,
'title'
=>
t
(
'User autocomplete'
),
'callback'
=>
'user_autocomplete'
,
'access'
=>
$view_access
,
'type'
=>
MENU_CALLBACK
);
// Registration and login pages.
$items
[]
=
array
(
'path'
=>
'user/login'
,
'title'
=>
t
(
'log in'
),
'callback'
=>
'drupal_get_form'
,
'callback arguments'
=>
array
(
'user_login'
),
'access'
=>
!
$user
->
uid
,
'type'
=>
MENU_DEFAULT_LOCAL_TASK
);
$items
[]
=
array
(
'path'
=>
'user/login'
,
'title'
=>
t
(
'Log in'
),
'callback'
=>
'drupal_get_form'
,
'callback arguments'
=>
array
(
'user_login'
),
'access'
=>
TRUE
,
'type'
=>
MENU_DEFAULT_LOCAL_TASK
);
$items
[]
=
array
(
'path'
=>
'user/register'
,
'title'
=>
t
(
'Create new account'
),
...
...
@@ -779,6 +783,12 @@ function user_menu($may_cache) {
// Add the CSS for this module. We put this in !$may_cache so it is only
// added once per request.
drupal_add_css
(
drupal_get_path
(
'module'
,
'user'
)
.
'/user.css'
,
'core'
);
if
(
$_GET
[
'q'
]
==
'user'
&&
$user
->
uid
)
{
// We want to make the current user's profile accessible without knowing
// their uid, so just linking to /user is enough. To achieve this goal,
// we do an internal redirect.
menu_set_active_item
(
'user/'
.
$user
->
uid
);
}
if
(
arg
(
0
)
==
'user'
&&
is_numeric
(
arg
(
1
))
&&
arg
(
1
)
>
0
)
{
$account
=
user_load
(
array
(
'uid'
=>
arg
(
1
)));
...
...
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