From 61b76fa2c1d54257e14d1700efc266e6999a64d1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 25 Nov 2002 17:56:38 +0000 Subject: - Fixed the "affiliate" text when all distributed authententication modules are disabled. Patch by Gerhard. --- modules/user.module | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'modules/user.module') 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 .= "

$msg

"; } - //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 .= "

" . 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)) ."

"; } -- cgit v1.2.3