Same name and namespace in other branches
  1. 4.6.x modules/user.module \user_module_invoke()
  2. 4.7.x modules/user.module \user_module_invoke()
  3. 5.x modules/user/user.module \user_module_invoke()
  4. 7.x modules/user/user.module \user_module_invoke()

Invokes hook_user() in every module.

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

Parameters

$op: The operation to be passed as the first parameter of the hook function.

$edit: An associative array variable containing form values to be passed as the second parameter of the hook function.

$account: The user account object to be passed as the third parameter of the hook function.

$category: The category of user information being acted upon.

11 calls to 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

... See full list

File

modules/user/user.module, line 28
Enables the user registration and login system.

Code

function user_module_invoke($op, &$edit, &$account, $category = NULL) {
  foreach (module_list() as $module) {
    $function = $module . '_user';
    if (function_exists($function)) {
      $function($op, $edit, $account, $category);
    }
  }
}