Commit 2d9eaf01 authored by drumm's avatar drumm
Browse files

#61150 by Zen, hook_user categories type should pass $account

parent f401bea1
......@@ -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);
}
}
......
......@@ -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);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment