function shortcut_set_unassign_user

Same name in other branches
  1. 7.x modules/shortcut/shortcut.module \shortcut_set_unassign_user()

Unassigns a user from any shortcut set they may have been assigned to.

The user will go back to using whatever default set applies.

Parameters

$account: A user account that will be removed from the shortcut set assignment.

Return value

TRUE if the user was previously assigned to a shortcut set and has been successfully removed from it. FALSE if the user was already not assigned to any set.

Deprecated

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal::entityTypeManager()->getStorage('shortcut_set')->unassignUser().

File

core/modules/shortcut/shortcut.module, line 151

Code

function shortcut_set_unassign_user($account) {
    return (bool) \Drupal::entityTypeManager()->getStorage('shortcut_set')
        ->unassignUser($account);
}

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