function 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 675
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');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.