Commit 3468310a authored by Dries's avatar Dries

- 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).
parent 9f4a3358
......@@ -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) {
......
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment