function Settings::clear
Same name and namespace in other branches
- 11.x core/themes/admin/src/Settings.php \Drupal\admin\Settings::clear()
Clears all admin settings for the current user.
Parameters
\Drupal\Core\Session\AccountInterface|null $account: The account object. Current user if NULL.
File
-
core/
themes/ admin/ src/ Settings.php, line 140
Class
- Settings
- Service to handle overridden user settings.
Namespace
Drupal\adminCode
public function clear(?AccountInterface $account = NULL) : void {
if (!$account || !$this->userData) {
$account = $this->currentUser;
}
$this->userData
->delete('admin', $account->id());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.