All pastes #525461 Raw Edit

chx

public php v1 · immutable
#525461 ·published 2007-05-31 11:31 UTC
rendered paste body
Index: user.module===================================================================RCS file: /cvs/drupal/drupal/modules/user/user.module,vretrieving revision 1.788diff -u -p -r1.788 user.module--- user.module 30 May 2007 08:08:59 -0000      1.788+++ user.module 31 May 2007 11:30:48 -0000@@ -754,6 +754,21 @@ function user_load_self($arg) {   return $arg; }+function _user_page_title() {+  return $GLOBALS['user']->uid ? t('My account') : t('Login');+}++function _user_page() {+  global $user;+  if ($user->uid) {+    if (user_view_access($user->uid)) {+      return user_view($user->uid);+    }+    return MENU_ACCESS_DENIED;+  }+  return drupal_get_form('user_login');+}+ /**  * Implementation of hook_menu().  */@@ -768,11 +783,9 @@ function user_menu() {   // Registration and login pages.   $items['user'] = array(-    'title' => 'Log in',-    'page callback' => 'drupal_get_form',-    'page arguments' => array('user_login'),-    'access callback' => 'user_is_anonymous',-    'type' => MENU_CALLBACK,+    'title callback' => '_user_page_title'+    'page callback' => '_user_page',+    'access callback' => TRUE,   );   $items['user/login'] = array(@@ -911,13 +924,14 @@ function user_menu() {     'weight' => 10,   );-  $items['user/%user_current'] = array(-    'title' => 'My account',+  $items['user/%user'] = array(+    'title' => 'View',     'page callback' => 'user_view',     'page arguments' => array(1),     'access callback' => 'user_view_access',     'access arguments' => array(1),     'parent' => '',+    'type' => MENU_CALLBACK,   );   $items['user/%user/view'] = array(