1 user.api.php hook_user_login(&$edit, $account)

The user just logged in.


$edit: The array of form values submitted by the user.

$account: The user object on which the operation was just performed.

Related topics


core/modules/user/user.api.php, line 264
Hooks provided by the User module.


function hook_user_login(&$edit, $account) {
  $config = config('system.date');
  // If the user has a NULL time zone, notify them to set a time zone.
  if (!$account->timezone && $config->get('user_configurable_timezones') && $config->get('user_empty_timezone_message')) {
    backdrop_set_message(t('Configure your <a href="@user-edit">account time zone setting</a>.', array('@user-edit' => url("user/$account->uid/edit", array('query' => backdrop_get_destination(), 'fragment' => 'edit-timezone')))));