class UserEvent in Social Auth 3.x
Same name and namespace in other branches
- 8.2 src/Event/UserEvent.php \Drupal\social_auth\Event\UserEvent
Dispatched when user is created or logged in through Social Auth.
Hierarchy
- class \Drupal\social_auth\Event\SocialAuthEventBase extends \Drupal\social_auth\Event\EventProxy
- class \Drupal\social_auth\Event\UserEvent
Expanded class hierarchy of UserEvent
See also
\Drupal\social_auth\Event\SocialAuthEvents
2 files declare their use of UserEvent
- UserAuthenticator.php in src/
User/ UserAuthenticator.php - UserManager.php in src/
User/ UserManager.php
File
- src/
Event/ UserEvent.php, line 13
Namespace
Drupal\social_auth\EventView source
class UserEvent extends SocialAuthEventBase {
/**
* The user.
*
* @var \Drupal\user\Entity\User
*/
protected $user;
/**
* The plugin id dispatching this event.
*
* @var string
*/
protected $pluginId;
/**
* The user's data passed by Social Auth.
*
* @var \Drupal\social_auth\User\SocialAuthUserInterface
*/
protected $socialAuthUser;
/**
* UserEvent constructor.
*
* @param \Drupal\user\UserInterface $user
* The user.
* @param string $plugin_id
* The plugin Id dispatching this event.
* @param \Drupal\social_auth\User\SocialAuthUserInterface|null $social_auth_user
* The user's data passed by Social Auth.
*/
public function __construct(UserInterface $user, $plugin_id, SocialAuthUserInterface $social_auth_user = NULL) {
$this->user = $user;
$this->pluginId = $plugin_id;
$this->socialAuthUser = $social_auth_user;
}
/**
* Gets the user.
*
* @return \Drupal\user\UserInterface
* The user.
*/
public function getUser() {
return $this->user;
}
/**
* Gets the plugin id dispatching this event.
*
* @return string
* The plugin id.
*/
public function getPluginId() {
return $this->pluginId;
}
/**
* Gets user's data passed by Social Auth.
*
* @return \Drupal\social_auth\User\SocialAuthUserInterface
* The user's data.
*/
public function getSocialAuthUser() {
return $this->socialAuthUser;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UserEvent:: |
protected | property | The plugin id dispatching this event. | |
UserEvent:: |
protected | property | The user's data passed by Social Auth. | |
UserEvent:: |
protected | property | The user. | |
UserEvent:: |
public | function | Gets the plugin id dispatching this event. | |
UserEvent:: |
public | function | Gets user's data passed by Social Auth. | |
UserEvent:: |
public | function | Gets the user. | |
UserEvent:: |
public | function | UserEvent constructor. |