public function OwnOrAdminConstraint::getAccount in Simple OAuth (OAuth2) & OpenID Connect 8
Gets the account.
Return value
\Drupal\Core\Session\AccountInterface The user.
Overrides OwnOrAdminConstraintInterface::getAccount
File
- src/
Plugin/ Validation/ Constraint/ OwnOrAdminConstraint.php, line 45
Class
- OwnOrAdminConstraint
- Class OwnOrAdminConstraint.
Namespace
Drupal\simple_oauth\Plugin\Validation\ConstraintCode
public function getAccount() {
return $this->account ?: \Drupal::currentUser();
}