function user_page

Access callback for path /user.

Displays user profile if user is logged in, or login form for anonymous users.

1 string reference to 'user_page'
user_menu in drupal/core/modules/user/user.module
Implements hook_menu().

File

drupal/core/modules/user/user.pages.inc, line 418
User page callback file for the user module.

Code

function user_page() {
  global $user;
  if ($user->uid) {
    return new RedirectResponse(url('user/' . $user->uid, array(
      'absolute' => TRUE,
    )));
  }
  else {
    return drupal_get_form('user_login_form');
  }
}