summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-10-14 17:51:43 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-10-14 17:51:43 -0400
commiteea00f936e9f7360f2490da6633a396395e817c1 (patch)
treed184155c1333533cee961133467a9bf240d77624 /modules
parent35d6361b0890a9b6ae6ba17e6f1816aaab981773 (diff)
downloadbrdo-eea00f936e9f7360f2490da6633a396395e817c1.tar.gz
brdo-eea00f936e9f7360f2490da6633a396395e817c1.tar.bz2
Issue #1842528 by cferthorney, owenpm3, jhodgdon: description of hook_user_categories() is incorrect
Diffstat (limited to 'modules')
-rw-r--r--modules/user/user.api.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/modules/user/user.api.php b/modules/user/user.api.php
index e732c146a..f205a85b5 100644
--- a/modules/user/user.api.php
+++ b/modules/user/user.api.php
@@ -183,7 +183,23 @@ function hook_user_operations() {
}
/**
- * Retrieve a list of user setting or profile information categories.
+ * Define a list of user settings or profile information categories.
+ *
+ * There are two steps to using hook_user_categories():
+ * - Create the category with hook_user_categories().
+ * - Display that category on the form ID of "user_profile_form" with
+ * hook_form_FORM_ID_alter().
+ *
+ * Step one builds out the category but it won't be visible on your form until
+ * you explicitly tell it to do so.
+ *
+ * The function in step two should contain the following code in order to
+ * display your new category:
+ * @code
+ * if ($form['#user_category'] == 'mycategory') {
+ * // Return your form here.
+ * }
+ * @endcode
*
* @return
* An array of associative arrays. Each inner array has elements: