You are here

public function SamlauthUserSyncEvent::markAccountChanged in SAML Authentication 4.x

Same name and namespace in other branches
  1. 8.3 src/Event/SamlauthUserSyncEvent.php \Drupal\samlauth\Event\SamlauthUserSyncEvent::markAccountChanged()
  2. 8.2 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 the 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 141

Class

SamlauthUserSyncEvent
Wraps a samlauth user sync event for event listeners.

Namespace

Drupal\samlauth\Event

Code

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