You are here

public function Check::skippedBy in Security Review 8

Returns the user the check was skipped by.

Returns null if it hasn't been skipped yet or the user that skipped the check is not valid anymore.

Return value

\Drupal\user\Entity\User|null The user the check was last skipped by (or null).

File

src/Check.php, line 338

Class

Check
Defines a security check.

Namespace

Drupal\security_review

Code

public function skippedBy() {
  $skipped_by = $this->config
    ->get('skipped_by');
  if (!is_int($skipped_by)) {
    return NULL;
  }
  return User::load($skipped_by);
}