summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcatch2012-11-06 13:52:45 +0000
committercatch2012-11-06 13:52:45 +0000
commit76ea27818786ea01ab6a2e4007650fe55b8bc2b2 (patch)
tree590f54eb192d8aa86bc8f56c52643792b9a2c59f
parent7f45c50c5ed300b02ef772b193535296801b58f9 (diff)
Issue #200344 by Pancho, pillarsdotnet, pdrake: Remove user_module_invoke() and rename user_login_block() to user_login_block_form().
-rw-r--r--core/modules/openid/openid.module2
-rw-r--r--core/modules/system/system.module2
-rw-r--r--core/modules/user/user.api.php2
-rw-r--r--core/modules/user/user.module25
4 files changed, 4 insertions, 27 deletions
diff --git a/core/modules/openid/openid.module b/core/modules/openid/openid.module
index 5071793..ada4933 100644
--- a/core/modules/openid/openid.module
+++ b/core/modules/openid/openid.module
@@ -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'))));
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 0e0077f..fb586f5 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -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')))));
diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php
index 0c3002c..8a21ef2 100644
--- a/core/modules/user/user.api.php
+++ b/core/modules/user/user.api.php
@@ -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')))));
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 6911853..04c0bc9 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -81,29 +81,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().
*/
function user_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);
}
/**