public function UserOneSettingsForm::access in User One 8
Allow access only for user one.
Parameters
\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'UserOneSettingsForm::access'
File
- src/
Form/ UserOneSettingsForm.php, line 185
Class
- UserOneSettingsForm
- User One configuration form.
Namespace
Drupal\userone\FormCode
public function access(AccountInterface $account) {
if ($account
->id() == 1) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}