You are here

function userone_user_view in User One 7

Implements hook_user_view(). Block viewing user 1 profile and redirect to one's own.

File

./userone.module, line 56
User One module.

Code

function userone_user_view($account, $view_mode, $langcode) {
  if ($account->uid == 1 and $GLOBALS['user']->uid != 1) {
    drupal_goto('user');
  }
}