function _uc_roles_flush_menu_cache in Ubercart 7.3
Same name and namespace in other branches
- 6.2 uc_roles/uc_roles.module \_uc_roles_flush_menu_cache()
Flushes the menu cache.
When roles are gained/lost, menu items might appear/disappear respectively, so we have to ensure the cache is rebuilt with any new values.
Parameters
$account: A Drupal user object.
See also
2 calls to _uc_roles_flush_menu_cache()
- uc_roles_delete in uc_roles/
uc_roles.module - Deletes an expiration using user id or user id and rid.
- uc_roles_grant in uc_roles/
uc_roles.module - Grants a role to a given user.
File
- uc_roles/
uc_roles.module, line 1213 - Grants roles upon accepted payment of products.
Code
function _uc_roles_flush_menu_cache($account) {
cache_clear_all($account->uid . ':', 'cache_menu', TRUE);
}