function ShortcutSetStorage::unassignUser

Same name and namespace in other branches
  1. 11.x core/modules/shortcut/src/ShortcutSetStorage.php \Drupal\shortcut\ShortcutSetStorage::unassignUser()

File

core/modules/shortcut/src/ShortcutSetStorage.php, line 101

Class

ShortcutSetStorage
Defines a storage for shortcut_set entities.

Namespace

Drupal\shortcut

Code

public function unassignUser($account) {
  $deleted = $this->connection
    ->delete('shortcut_set_users')
    ->condition('uid', $account->id())
    ->execute();
  return (bool) $deleted;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.