You are here

UserLoginEvent.php in Rules 8.3

Namespace

Drupal\rules\Event

File

src/Event/UserLoginEvent.php
View source
<?php

namespace Drupal\rules\Event;

use Drupal\user\UserInterface;
use Symfony\Component\EventDispatcher\Event;

/**
 * Event that is fired when a user logs in.
 *
 * @see rules_user_login()
 */
class UserLoginEvent extends Event {
  const EVENT_NAME = 'rules_user_login';

  /**
   * The user account.
   *
   * @var \Drupal\user\UserInterface
   */
  public $account;

  /**
   * Constructs the object.
   *
   * @param \Drupal\user\UserInterface $account
   *   The account of the user logged in.
   */
  public function __construct(UserInterface $account) {
    $this->account = $account;
  }

}

Classes

Namesort descending Description
UserLoginEvent Event that is fired when a user logs in.