Commit 76ea2781 authored by catch's avatar catch

Issue #200344 by Pancho, pillarsdotnet, pdrake: Remove user_module_invoke()...

Issue #200344 by Pancho, pillarsdotnet, pdrake: Remove user_module_invoke() and rename user_login_block() to user_login_block_form().
parent 7f45c50c
......@@ -107,7 +107,7 @@ function openid_user_insert($account) {
*
* Save openid_identifier to visitor cookie.
*/
function openid_user_login(&$edit, $account) {
function openid_user_login($edit, $account) {
if (isset($_SESSION['openid'])) {
// The user has logged in via OpenID.
user_cookie_save(array_intersect_key($_SESSION['openid']['user_login_values'], array_flip(array('openid_identifier'))));
......
......@@ -2477,7 +2477,7 @@ function system_user_presave($account) {
/**
* Implements hook_user_login().
*/
function system_user_login(&$edit, $account) {
function system_user_login($edit, $account) {
// If the user has a NULL time zone, notify them to set a time zone.
if (!$account->timezone && variable_get('configurable_timezones', 1) && variable_get('empty_timezone_message', 0)) {
drupal_set_message(t('Configure your <a href="@user-edit">account time zone setting</a>.', array('@user-edit' => url("user/$account->uid/edit", array('query' => drupal_get_destination(), 'fragment' => 'edit-timezone')))));
......
......@@ -312,7 +312,7 @@ function hook_user_update($account) {
* @param $account
* The user object on which the operation was just performed.
*/
function hook_user_login(&$edit, $account) {
function hook_user_login($edit, $account) {
// If the user has a NULL time zone, notify them to set a time zone.
if (!$account->timezone && variable_get('configurable_timezones', 1) && variable_get('empty_timezone_message', 0)) {
drupal_set_message(t('Configure your <a href="@user-edit">account time zone setting</a>.', array('@user-edit' => url("user/$account->uid/edit", array('query' => drupal_get_destination(), 'fragment' => 'edit-timezone')))));
......
......@@ -80,29 +80,6 @@ function user_help($path, $arg) {
}
}
/**
* Invokes a user hook in every module.
*
* We cannot use module_invoke() for this, because the arguments need to
* be passed by reference.
*
* @param $type
* A text string that controls which user hook to invoke. Valid choices are:
* - login: Invokes hook_user_login().
* @param $edit
* An associative array variable containing form values to be passed
* as the first parameter of the hook function.
* @param $account
* The user account object to be passed as the second parameter of the hook
* function.
*/
function user_module_invoke($type, &$edit, $account) {
foreach (module_implements('user_' . $type) as $module) {
$function = $module . '_user_' . $type;
$function($edit, $account);
}
}
/**
* Implements hook_theme().
*/
......@@ -1733,7 +1710,7 @@ function user_login_finalize(&$edit = array()) {
// or incorrectly does a redirect which would leave the old session in place.
drupal_session_regenerate();
user_module_invoke('login', $edit, $user);
module_invoke_all('user_login', $edit, $user);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment