? 259368_2.patch ? 306027-user-modules-uninstalled-D7.patch ? 306027-user-modules-uninstalled-D7_test_5_above.patch ? 306027-user-modules-uninstalled-D7_with_test.patch ? 306027-user-modules-uninstalled-D7_with_test2.patch ? 306027-user-modules-uninstalled-D7_with_test3.patch ? 306027-user-modules-uninstalled-D7_with_test_4_above.patch ? 306027-user-modules-uninstalled-D7_with_test_4_unter.patch ? 310212.patch ? 353580-1-axyjo.patch ? 353580-2-axyjo.patch ? Test_menu_get_item_0.patch ? Test_menu_get_item_0.patch.1 ? Test_menu_get_item_1.patch ? access_log_settings_0.patch ? admin_theme_only_admins_1.patch ? allow-hash-url-7.x[2].patch ? allow-hash-url_7_2.patch ? allow-hash-url_7_3.patch ? allow-hash-url_7_4.patch ? batch_with_timer-1226896443.patch ? batch_with_timer-1226896443_sec.patch ? commentadd-link-hidden-356445.patch ? current.patch ? d6-submitted-microdate2.patch.txt ? d76_trigger_tokens.patch ? drupal-7-hookcomment_0.patch ? drupal_build_form.patch ? drupal_js-302251.patch ? filter_check_markup_0.patch ? filter_check_markup_1.patch ? filter_check_markup_2.patch ? forum_loop.patch ? l_class_test_2.patch ? language_loop.patch ? language_loop.patch.1 ? module_rework.patch ? multiple_require_once_1.patch ? node_access_test.patch ? node_access_test_1.patch ? openid_loop.patch ? remove_hook_comment_op.patch ? remove_hook_comment_op.patch.1 ? remove_hook_comment_op_3.patch ? remove_hook_comment_op_4.patch ? remove_hook_comment_op_5.patch ? remove_hook_comment_op_6.patch ? remove_hook_comment_op_7.patch ? search_36.patch ? signature_format_01[1].patch ? signature_format_02.patch ? signature_format_03.patch ? signature_format_04.patch ? taxonomy_admin_loop.patch ? theme-inc-dbtng.patch ? trigger_broken_fix.patch ? trigger_nodeapi_d6.patch ? upload-submit-move-D7.patch ? user_op_comment_3.patch ? user_op_comment_4.patch ? modules/filter/.filter.module.swp ? modules/node/.node.module.swp ? modules/node/.node.test.swo ? modules/node/.node.test.swp ? modules/simpletest/.drupal_web_test_case.php.swp ? modules/simpletest/tests/.node_access_test.module.swp ? modules/simpletest/tests/common.info ? modules/simpletest/tests/common.module ? modules/simpletest/tests/l_class_test.patch ? modules/upload/upload_12-24-08.patch ? modules/user/.user.test.swp ? sites/default/files ? sites/default/settings.php Index: modules/user/user.api.php =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.api.php,v retrieving revision 1.2 diff -u -p -r1.2 user.api.php --- modules/user/user.api.php 8 Jan 2009 08:42:13 -0000 1.2 +++ modules/user/user.api.php 11 Jan 2009 21:15:03 -0000 @@ -14,37 +14,8 @@ /** * Act on user account actions. * - * This hook allows modules to react when operations are performed on user - * accounts. + * This hook allows modules to react when operations are performed on user accounts. * - * @param $op - * What kind of action is being performed. Possible values (in alphabetical order): - * - "after_update": The user object has been updated and changed. Use this if - * (probably along with 'insert') if you want to reuse some information from - * the user object. - * - "categories": A set of user information categories is requested. - * - "form": The user account edit form is about to be displayed. The module - * should present the form elements it wishes to inject into the form. - * - "insert": The user account is being added. The module should save its - * custom additions to the user object into the database and set the saved - * fields to NULL in $edit. - * - "load": The user account is being loaded. The module may respond to this - * - "login": The user just logged in. - * - "logout": The user just logged out. - * and insert additional information into the user object. - * - "register": The user account registration form is about to be displayed. - * The module should present the form elements it wishes to inject into the - * form. - * - "submit": Modify the account before it gets saved. - * - "update": The user account is being changed. The module should save its - * custom additions to the user object into the database and set the saved - * fields to NULL in $edit. - * - "validate": The user account is about to be modified. The module should - * validate its custom additions to the user object, registering errors as - * necessary. - * - "view": The user's account information is being displayed. The module - * should format its custom additions for display and add them to the - * $account->content array. * @param &$edit * The array of form values submitted by the user. * @param &$account @@ -52,45 +23,161 @@ * @param $category * The active category of user information being edited. * @return - * This varies depending on the operation. - * - "categories": A linear array of associative arrays. These arrays have - * keys: - * - "name": The internal name of the category. - * - "title": The human-readable, localized name of the category. - * - "weight": An integer specifying the category's sort ordering. - * - "delete": None. - * - "form", "register": A $form array containing the form elements to display. - * - "insert": None. - * - "load": None. - * - "login": None. - * - "logout": None. - * - "submit": None: - * - "update": None. - * - "validate": None. - * - "view": None. For an example see: user_user(). - */ -function hook_user($op, &$edit, &$account, $category = NULL) { - if ($op == 'form' && $category == 'account') { - $form['comment_settings'] = array( - '#type' => 'fieldset', - '#title' => t('Comment settings'), - '#collapsible' => TRUE, - '#weight' => 4); - $form['comment_settings']['signature'] = array( - '#type' => 'textarea', - '#title' => t('Signature'), - '#default_value' => $edit['signature'], - '#description' => t('Your signature will be publicly displayed at the end of your comments.')); - return $form; - } + * None. + */ +function hook_user_form(&$edit, &$account, $category = NULL) { +} + +/** + * The user account is being added. + * The module should save its custom additions to the user object into the database + * and set the saved fields to NULL in $edit. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_insert(&$edit, &$account, $category = NULL) { +} + +/** + * The user account is being loaded. + * The module may respond to this and insert additional information into the user object. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_load(&$edit, &$account, $category = NULL) { +} + +/** + * The user just logged in. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_login(&$edit, &$account, $category = NULL) { +} + +/** + * The user just logged out. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_logout(&$edit, &$account, $category = NULL) { +} + +/** + * The user account registration form is about to be displayed. + * The module should present the form elements it wishes to inject into the form. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_register(&$edit, &$account, $category = NULL) { +} + +/** + * Modify the account before it gets saved. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_submit(&$edit, &$account, $category = NULL) { +} + +/** + * The user account is being changed. + * The module should save its custom additions to the user object into the database + * and set the saved fields to NULL in $edit. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_update(&$edit, &$account, $category = NULL) { +} + +/** + * The user account is about to be modified. + * The module should validate its custom additions to the user object, registering errors as necessary. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_validate(&$edit, &$account, $category = NULL) { +} + +/** + * The user's account information is being displayed. + * The module should format its custom additions for display + * and add them to the $account->content array. + * + * @param &$edit + * The array of form values submitted by the user. + * @param &$account + * The user object on which the operation is being performed. + * @param $category + * The active category of user information being edited. + * @return + * None. + */ +function hook_user_view(&$edit, &$account, $category = NULL) { } /** * Act on user account cancellations. * * The user account is being canceled. Depending on the account cancellation - * method, the module should either do nothing, unpublish content, anonymize - * content, or delete content and data belonging to the canceled user account. + * method, the module should either do nothing, unpublish content, anonymize content, + * or delete content and data belonging to the canceled user account. * * Expensive operations should be added to the global batch with batch_set(). *