shortcut_set_assign_user

Versions
7
shortcut_set_assign_user($shortcut_set, $account)

Assign a user to a particular shortcut set.

Parameters

$shortcut_set An object representing the shortcut set.

$account A user account that will be assigned to use the set.

Code

modules/shortcut/shortcut.module, line 343

<?php
function shortcut_set_assign_user($shortcut_set, $account) {
  db_merge('shortcut_set_users')
    ->key(array('uid' => $account->uid))
    ->fields(array('set_name' => $shortcut_set->set_name))
    ->execute();
  drupal_static_reset('shortcut_current_displayed_set');
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.