function user_page in Drupal 7
Same name and namespace in other branches
- 6 modules/user/user.pages.inc \user_page()
Page callback: Displays the user page.
Displays user profile if user is logged in, or login form for anonymous users.
Return value
A render array for either a user profile or a login form.
See also
1 string reference to 'user_page'
- user_menu in modules/
user/ user.module - Implements hook_menu().
File
- modules/
user/ user.pages.inc, line 671 - User page callback file for the user module.
Code
function user_page() {
global $user;
if ($user->uid) {
menu_set_active_item('user/' . $user->uid);
return menu_execute_active_handler(NULL, FALSE);
}
else {
return drupal_get_form('user_login');
}
}