diff --git a/modules/user/user.module b/modules/user/user.module index b4271e4f0d0df3dfdb53534e5327502c38ab6c3a..621a9e0e6bca7ab3e79a89836450fa59fe576d14 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -697,7 +697,7 @@ function user_menu($may_cache) { // Registration and login pages. $items[] = array('path' => 'user/login', 'title' => t('log in'), - 'callback' => 'drupal_get_form', 'callback arguments' => array('user_login'), 'access' => !$user->uid, 'type' => MENU_DEFAULT_LOCAL_TASK); + 'callback' => 'drupal_get_form', 'callback arguments' => array('user_login'), 'access' => TRUE, 'type' => MENU_DEFAULT_LOCAL_TASK); $items[] = array('path' => 'user/register', 'title' => t('create new account'), 'callback' => 'drupal_get_form', 'callback arguments' => array('user_register'), 'access' => !$user->uid && variable_get('user_register', 1), 'type' => MENU_LOCAL_TASK); $items[] = array('path' => 'user/password', 'title' => t('request new password'), @@ -901,9 +901,6 @@ function user_login($msg = '') { ); $form['submit'] = array('#type' => 'submit', '#value' => t('Log in'), '#weight' => 2, '#attributes' => array('tabindex' => '3')); - // We set the action to 'user' because 'user/login' is no longer accessible once logged in: - $form['#action'] = url('user'); - return $form; } @@ -947,6 +944,7 @@ function user_login_submit($form_id, $form_values) { user_module_invoke('login', $form_values, $user); sess_regenerate(); + return 'user/'. $user->uid; } }