You are here

function spaces_core_user in Spaces 5.2

Same name and namespace in other branches
  1. 5 spaces_core/spaces_core.module \spaces_core_user()

Implementation of hook_user().

File

spaces_core/spaces_core.module, line 102

Code

function spaces_core_user($op, &$edit, &$account, $category = NULL) {
  switch ($op) {
    case 'view':
      global $user;
      context_set('spaces', 'user', $account->uid);
      if ($user->uid == $account->uid) {
        $links = array();
        $links['user']['title'] = t('Edit my account');
        $links['user']['href'] = 'user/' . $account->uid . '/edit';
        $links['user']['custom'] = true;
        context_set('spaces', 'links', $links);
      }
      break;
  }
}