user_module_invoke

Versions
4.6 – 6
user_module_invoke($type, &$array, &$user, $category = NULL)
7
user_module_invoke($type, &$edit, $account, $category = NULL)

Invokes hook_user() in every module.

We cannot use module_invoke() for this, because the arguments need to be passed by reference.

▾ 11 functions call user_module_invoke()

user_authenticate_finalize in modules/user/user.module
Finalize the login process. Must be called when logging in a user.
user_build_content in modules/user/user.module
Builds a structured array representing the profile content.
user_delete in modules/user/user.module
Delete a user.
user_edit_submit in modules/user/user.pages.inc
user_edit_validate in modules/user/user.pages.inc
user_load in modules/user/user.module
Fetch a user object.
user_logout in modules/user/user.pages.inc
Menu callback; logs the current user out, and redirects to the home page.
user_profile_form_submit in modules/user/user.pages.inc
Submit function for the user account and profile editing form.
user_profile_form_validate in modules/user/user.pages.inc
Validation function for the user account and profile editing form.
user_register_validate in modules/user/user.module
user_save in modules/user/user.module
Save changes to a user account or add a new user.

Code

modules/user/user.module, line 17

<?php
function user_module_invoke($type, &$array, &$user, $category = NULL) {
  foreach (module_list() as $module) {
    $function = $module .'_user';
    if (function_exists($function)) {
      $function($type, $array, $user, $category);
    }
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.