1 user.module user_module_invoke($type, &$edit, $account)

Invokes a user hook in every module.

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

Parameters

$type: A text string that controls which user hook to invoke. Valid choices are:

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

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

File

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

Code

function user_module_invoke($type, &$edit, $account) {
  foreach (module_implements('user_' . $type) as $module) {
    $function = $module . '_user_' . $type;
    $function($edit, $account);
  }
}