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
2d9eaf01
Commit
2d9eaf01
authored
May 16, 2006
by
Neil Drumm
Browse files
#61150
by Zen, hook_user categories type should pass $account
parent
f401bea1
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/user.module
View file @
2d9eaf01
...
...
@@ -802,7 +802,7 @@ function user_menu($may_cache) {
'type'
=>
MENU_CALLBACK
);
if
(
arg
(
2
)
==
'edit'
)
{
if
((
$categories
=
_user_categories
())
&&
(
count
(
$categories
)
>
1
))
{
if
((
$categories
=
_user_categories
(
$account
))
&&
(
count
(
$categories
)
>
1
))
{
foreach
(
$categories
as
$key
=>
$category
)
{
$items
[]
=
array
(
'path'
=>
'user/'
.
arg
(
1
)
.
'/edit/'
.
$category
[
'name'
],
...
...
@@ -2062,11 +2062,11 @@ function user_help_page() {
/**
* Retrieve a list of all user setting/information categories and sort them by weight.
*/
function
_user_categories
()
{
function
_user_categories
(
$account
)
{
$categories
=
array
();
foreach
(
module_list
()
as
$module
)
{
if
(
$data
=
module_invoke
(
$module
,
'user'
,
'categories'
,
NULL
,
NULL
,
''
))
{
if
(
$data
=
module_invoke
(
$module
,
'user'
,
'categories'
,
NULL
,
$account
,
''
))
{
$categories
=
array_merge
(
$data
,
$categories
);
}
}
...
...
modules/user/user.module
View file @
2d9eaf01
...
...
@@ -802,7 +802,7 @@ function user_menu($may_cache) {
'type'
=>
MENU_CALLBACK
);
if
(
arg
(
2
)
==
'edit'
)
{
if
((
$categories
=
_user_categories
())
&&
(
count
(
$categories
)
>
1
))
{
if
((
$categories
=
_user_categories
(
$account
))
&&
(
count
(
$categories
)
>
1
))
{
foreach
(
$categories
as
$key
=>
$category
)
{
$items
[]
=
array
(
'path'
=>
'user/'
.
arg
(
1
)
.
'/edit/'
.
$category
[
'name'
],
...
...
@@ -2062,11 +2062,11 @@ function user_help_page() {
/**
* Retrieve a list of all user setting/information categories and sort them by weight.
*/
function
_user_categories
()
{
function
_user_categories
(
$account
)
{
$categories
=
array
();
foreach
(
module_list
()
as
$module
)
{
if
(
$data
=
module_invoke
(
$module
,
'user'
,
'categories'
,
NULL
,
NULL
,
''
))
{
if
(
$data
=
module_invoke
(
$module
,
'user'
,
'categories'
,
NULL
,
$account
,
''
))
{
$categories
=
array_merge
(
$data
,
$categories
);
}
}
...
...
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