Commit e5f2c1ef authored by Dries's avatar Dries

- Usability improvement: avoid showing two login forms on one page.  Suggested
  by Keith.
parent bbf78ea1
...@@ -328,6 +328,15 @@ function user_block($op = "list", $delta = 0) { ...@@ -328,6 +328,15 @@ function user_block($op = "list", $delta = 0) {
switch ($delta) { switch ($delta) {
case 0: case 0:
if (!$user->uid) { 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"; $output = "<div class=\"user-login-block\">\n";
/* /*
......
...@@ -328,6 +328,15 @@ function user_block($op = "list", $delta = 0) { ...@@ -328,6 +328,15 @@ function user_block($op = "list", $delta = 0) {
switch ($delta) { switch ($delta) {
case 0: case 0:
if (!$user->uid) { 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"; $output = "<div class=\"user-login-block\">\n";
/* /*
......
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