diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-11-25 17:56:38 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-11-25 17:56:38 +0000 |
commit | 61b76fa2c1d54257e14d1700efc266e6999a64d1 (patch) | |
tree | b75645a956e2b4e8d07693b4405ac7ba44fe877e | |
parent | aab82c0aebb0cc2df8fd49175c5ba120877be492 (diff) | |
download | brdo-61b76fa2c1d54257e14d1700efc266e6999a64d1.tar.gz brdo-61b76fa2c1d54257e14d1700efc266e6999a64d1.tar.bz2 |
- Fixed the "affiliate" text when all distributed authententication modules
are disabled. Patch by Gerhard.
-rw-r--r-- | modules/user.module | 10 | ||||
-rw-r--r-- | modules/user/user.module | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/modules/user.module b/modules/user.module index 15c31ae4e..3dead5a3b 100644 --- a/modules/user.module +++ b/modules/user.module @@ -595,8 +595,12 @@ function user_login($edit = array(), $msg = "") { if ($msg) { $output .= "<p>$msg</p>"; } - //TODO: alter text if there are not affiliates - $output .= form_textfield(t("Username"), "name", $edit["name"], 20, 64, t("Enter your %s username, or an ID from one of our affiliates: %a.", array("%s" => variable_get("site_name", "local"), "%a" => implode(", ", user_auth_help_links())))); + if (count(user_auth_help_links()) > 0) { + $output .= form_textfield(t("Username"), "name", $edit["name"], 20, 64, t("Enter your %s username, or an ID from one of our affiliates: %a.", array("%s" => variable_get("site_name", "local"), "%a" => implode(", ", user_auth_help_links())))); + } + else { + $output .= form_textfield(t("Username"), "name", $edit["name"], 20, 64, t("Enter your %s username.", array("%s" => variable_get("site_name", "local")))); + } $output .= form_password(t("Password"), "pass", $pass, 20, 64, t("Enter the password that accompanies your username.")); $output .= form_checkbox(t("Remember me"), "remember_me", 1, 0, 0); $output .= form_submit(t("Log in")); @@ -802,7 +806,7 @@ function user_register($edit = array()) { // display the registration form $affiliates = user_auth_help_links(); - if (array_count_values($affiliates) > 1) { + if (count($affiliates) > 0) { $affiliates = implode(", ", $affiliates); $output .= "<p>" . t("Note: If you have an account with one of our affiliates (%s), you may ". lm("login now", array("mod" => "user", "op" => "login")) ." instead of registering.", array("%s" => $affiliates)) ."</p>"; } diff --git a/modules/user/user.module b/modules/user/user.module index 15c31ae4e..3dead5a3b 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -595,8 +595,12 @@ function user_login($edit = array(), $msg = "") { if ($msg) { $output .= "<p>$msg</p>"; } - //TODO: alter text if there are not affiliates - $output .= form_textfield(t("Username"), "name", $edit["name"], 20, 64, t("Enter your %s username, or an ID from one of our affiliates: %a.", array("%s" => variable_get("site_name", "local"), "%a" => implode(", ", user_auth_help_links())))); + if (count(user_auth_help_links()) > 0) { + $output .= form_textfield(t("Username"), "name", $edit["name"], 20, 64, t("Enter your %s username, or an ID from one of our affiliates: %a.", array("%s" => variable_get("site_name", "local"), "%a" => implode(", ", user_auth_help_links())))); + } + else { + $output .= form_textfield(t("Username"), "name", $edit["name"], 20, 64, t("Enter your %s username.", array("%s" => variable_get("site_name", "local")))); + } $output .= form_password(t("Password"), "pass", $pass, 20, 64, t("Enter the password that accompanies your username.")); $output .= form_checkbox(t("Remember me"), "remember_me", 1, 0, 0); $output .= form_submit(t("Log in")); @@ -802,7 +806,7 @@ function user_register($edit = array()) { // display the registration form $affiliates = user_auth_help_links(); - if (array_count_values($affiliates) > 1) { + if (count($affiliates) > 0) { $affiliates = implode(", ", $affiliates); $output .= "<p>" . t("Note: If you have an account with one of our affiliates (%s), you may ". lm("login now", array("mod" => "user", "op" => "login")) ." instead of registering.", array("%s" => $affiliates)) ."</p>"; } |