Current usage:

function hook_user_categories($edit, $account, $category = NULL)

$edit is NULL, $account is new stdClass() and $category obviously makes no sense anyway...

The attached patch removes all that unecessary stuff and adds api documentation for the hook.

Comments

berdir’s picture

Status: Active » Needs review
chx’s picture

Status: Needs review » Reviewed & tested by the community

This comes from older Drupals that used hook_user op categories. Nice work.

catch’s picture

Status: Reviewed & tested by the community » Needs work
+function hook_user_categories() {
+    return array(array('name' => 'account', 'title' => t('Account settings'), 'weight' => 1));
+}

four spaces

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new3.93 KB

Updated :)

catch’s picture

Status: Needs review » Reviewed & tested by the community

Better.

dries’s picture

Status: Reviewed & tested by the community » Needs work

Committed this to CVS HEAD, but we should have tests for this IMO.

berdir’s picture

To test what exactly?

It wasn't broken - it was just unecessary ugly, but worked. And profile.module does use different categories in the tests.

catch’s picture

Status: Needs work » Fixed

Putting back to fixed, if we're missing coverage anywhere it could be added as part of #479220: Finish up tests for Profile module

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.