user_module_invoke

function user_module_invoke

user_module_invoke($type, &$edit, $account, $category = NULL)

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.

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

File

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

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!user!user.module/function/user_module_invoke/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部