user_module_invoke

Definition

user_module_invoke($type, &$array, &$user, $category = NULL)
modules/user.module, line 14

Description

Invokes hook_user() in every module.

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

Code

<?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);
    }
  }
}
?>
 
 

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.