summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/user.module9
-rw-r--r--modules/user/user.module9
2 files changed, 18 insertions, 0 deletions
diff --git a/modules/user.module b/modules/user.module
index 233da2b96..4ca8af7b7 100644
--- a/modules/user.module
+++ b/modules/user.module
@@ -328,6 +328,15 @@ function user_block($op = "list", $delta = 0) {
switch ($delta) {
case 0:
if (!$user->uid) {
+ /*
+ ** For usability's sake, avoid showing two login forms on one
+ ** page.
+ */
+
+ if (arg(0) == "user" && arg(1) != "view") {
+ return;
+ }
+
$output = "<div class=\"user-login-block\">\n";
/*
diff --git a/modules/user/user.module b/modules/user/user.module
index 233da2b96..4ca8af7b7 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -328,6 +328,15 @@ function user_block($op = "list", $delta = 0) {
switch ($delta) {
case 0:
if (!$user->uid) {
+ /*
+ ** For usability's sake, avoid showing two login forms on one
+ ** page.
+ */
+
+ if (arg(0) == "user" && arg(1) != "view") {
+ return;
+ }
+
$output = "<div class=\"user-login-block\">\n";
/*