You are here

function _uc_roles_flush_menu_cache in Ubercart 6.2

Same name and namespace in other branches
  1. 7.3 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

uc_roles_delete()

uc_roles_grant()

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 1333

Code

function _uc_roles_flush_menu_cache($account) {
  cache_clear_all($account->uid . ':', 'cache_menu', TRUE);
}