You are here

public function SamlauthUserSyncEvent::markAccountChanged in SAML Authentication 8.2

Same name and namespace in other branches
  1. 8.3 src/Event/SamlauthUserSyncEvent.php \Drupal\samlauth\Event\SamlauthUserSyncEvent::markAccountChanged()
  2. 4.x src/Event/SamlauthUserSyncEvent.php \Drupal\samlauth\Event\SamlauthUserSyncEvent::markAccountChanged()

Marks the user account as changed.

This is the way for event subscribers to make sure user account gets saved. This method exists because subscribers must never save new accounts by themselves. (Non-new accounts could be saved by the event subscribers but just calling markAccountChanged() will keep the account from being saved multiple times by multiple subscribers.)

File

src/Event/SamlauthUserSyncEvent.php, line 107

Class

SamlauthUserSyncEvent
Wraps a samlauth user sync event for event listeners.

Namespace

Drupal\samlauth\Event

Code

public function markAccountChanged() {
  $this->accountChanged = TRUE;
}