You are here

function context_user in Context 6.2

Same name and namespace in other branches
  1. 6.3 context.core.inc \context_user()
  2. 6 context.core.inc \context_user()

Implementation of hook_user().

File

./context.core.inc, line 431

Code

function context_user($op, &$edit, &$account, $category = NULL) {
  if ($op == 'view' && !empty($account->roles)) {
    foreach (array_keys($account->roles) as $rid) {
      context_set_by_condition('user', $rid);
    }
  }
}