From 3468310a61399a67b75753e179e328389f73bd93 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 24 Jun 2004 05:07:55 +0000 Subject: - Patch #8778 by Morbus Iff: with the tabs patch, user/login, user/register, and user/password now show all three forms, as opposed to just the requested relevance. The attached patch implements a quick workaround: three new callbacks, and a cheapy modification of user_page where I use a ternary to test whether arg(2) exists (as it would in the case of user/nnn/edit). If it does, we set that to $op, and if it doesn't (in the case of user/login, etc.), we set arg(1). --- modules/user/user.module | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'modules/user/user.module') diff --git a/modules/user/user.module b/modules/user/user.module index 7f93e0321..923805028 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -620,7 +620,11 @@ function user_menu() { 'callback' => 'user_page', 'access' => TRUE, 'type' => MENU_CALLBACK); $items[] = array('path' => 'user/login', 'title' => t('log in'), - 'type' => MENU_CALLBACK); + 'callback' => 'user_page', 'access' => TRUE, 'type' => MENU_CALLBACK); + $items[] = array('path' => 'user/register', 'title' => t('register'), + 'callback' => 'user_page', 'access' => TRUE, 'type' => MENU_CALLBACK); + $items[] = array('path' => 'user/password', 'title' => t('request new password'), + 'callback' => 'user_page', 'access' => TRUE, 'type' => MENU_CALLBACK); $items[] = array('path' => 'admin/user', 'title' => t('users'), 'callback' => 'user_admin', 'access' => $access); @@ -1173,7 +1177,7 @@ function user_page() { $op = $_POST['op']; if (empty($op)) { - $op = arg(2); + $op = arg(2) ? arg(2) : arg(1); } switch ($op) { -- cgit v1.2.3