summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-11-19 19:40:31 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2001-11-19 19:40:31 +0000
commit90e207267f76c76cd020b873d52975244b278319 (patch)
tree0de6e9a37feac8b8d01875d78b4912e639021f89 /modules/user/user.module
parentccbbddbc9577bde85bfa4d265cda4716a52ce8d0 (diff)
downloadbrdo-90e207267f76c76cd020b873d52975244b278319.tar.gz
brdo-90e207267f76c76cd020b873d52975244b278319.tar.bz2
Applied patch by Moshe Weitzman
- fixes help text - adds better login failure messages to user and to watchdog.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module21
1 files changed, 15 insertions, 6 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index 474c8e6de..b6791ceab 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -372,7 +372,7 @@ roles:
idea, and logs in with a username of joe@remote.delphiforums.com and his usual
Delphi password. Drupal then communicates with remote.delphiforums.com (usually using <a href="http://www.xmlrpc.com/">XML-RPC</a>,
<a href="http://www.w3.org/Protocols/">HTTP POST</a>, or <a href="http://www.soapware.org/">SOAP</a>) behind
- the scenes and asks &quot;is the password for username=joe? If Delphi replies
+ the scenes and asks &quot;is this password for username=joe? If Delphi replies
yes, then Drupal will create a new local account for joe and log joe into it.
Joe may keep on logging into your Drupal instance in the same manner, and he
will be logged into the same joe@remote.delphiforums.com account.</p>
@@ -383,8 +383,8 @@ roles:
joe@remote.delphiforums.com (because Delphi says so), he looks up Joe's UID
and logs Joe into that account.</p>
<p>Drupal is setup so that it is very easy to add support for any external authentication
- source. See the <a href="http://ww.drupal.org/">Drupal Handbook</a> for information
- on authpring authentication modules. You currently have the following authentication modules installed ...</p>
+ source. See the <a href="http://www.drupal.org/">Drupal Handbook</a> for information
+ on authoring authentication modules. You currently have the following authentication modules installed ...</p>
<?
foreach (module_list() as $module) {
if (module_hook($module, "auth")) {
@@ -592,11 +592,13 @@ function user_login($edit = array()) {
*/
if (!$user && $server && $result = user_get_authmaps("", "$name@$server")) {
- // print "in external load for $name|$pass|$server|" . key($result);
if (module_invoke(key($result), "auth", $name, $pass, $server)) {
$user = user_external_load("$name@$server");
watchdog("user", "external load: $name@$server, module: " . key($result));
}
+ else {
+ $error = sprintf(t("Invalid password for %s."), "<i>$name@$server</i>");
+ }
}
/*
@@ -635,8 +637,15 @@ function user_login($edit = array()) {
drupal_goto($url);
}
else {
- watchdog("user", "failed to login for '". $name ."': invalid password");
- $error = t("Authentication failed.");
+ if (!$error) {
+ $error = t("Authentication failed.");
+ }
+ if ($server) {
+ watchdog("user", "failed login for '$name@$server': $error");
+ }
+ else {
+ watchdog("user", "failed login for '$name': $error");
+ }
}
}