You are here

public function AuditLogEvent::setUser in Audit Log 8

Same name and namespace in other branches
  1. 8.2 src/AuditLogEvent.php \Drupal\audit_log\AuditLogEvent::setUser()

Stores the user that triggers the audit event.

Parameters

\Drupal\Core\Session\AccountInterface $user: The user object of the user performing an action to be logged.

Return value

AuditLogEventInterface The current instance of the object.

Overrides AuditLogEventInterface::setUser

File

src/AuditLogEvent.php, line 73

Class

AuditLogEvent
Represents a single auditable event for logging.

Namespace

Drupal\audit_log

Code

public function setUser(AccountInterface $user) {
  $this->user = $user;
  return $this;
}