summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2011-01-10 13:54:51 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2011-01-10 13:54:51 (GMT)
commit137cb0e6c1e58bb1a6fff0847a9e11a7abdeff2b (patch)
tree2ab80d2b2ea49a80a3a7ef0fe8fae6fdf897bbb9
parentcddf0fbadc56c554cc194dcee4120be4d025911b (diff)
downloadsamlauth-elgg-137cb0e6c1e58bb1a6fff0847a9e11a7abdeff2b.zip
samlauth-elgg-137cb0e6c1e58bb1a6fff0847a9e11a7abdeff2b.tar.gz
samlauth-elgg-137cb0e6c1e58bb1a6fff0847a9e11a7abdeff2b.tar.bz2
Add more logging
-rw-r--r--start.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/start.php b/start.php
index 4026932..1cc9251 100644
--- a/start.php
+++ b/start.php
@@ -32,7 +32,11 @@
if ($user = get_entities_from_metadata('ldapDN', $elgg_user['ldapDN'], 'user')) {
$user = $user[0];
}
- error_log('SAMLAuth found user "' . $user . '" for ldapDN "' . $elgg_user['ldapDN'] . '"');
+ if ($user) {
+ error_log('SAMLAuth found user "' . $user->username . '" for ldapDN "' . $elgg_user['ldapDN'] . '"');
+ } else {
+ error_log('SAMLAuth found no user for ldapDN ' . $elgg_user['ldapDN']);
+ }
if (! $user)
{
try {
@@ -40,6 +44,7 @@
$elgg_user['name'], $elgg_user['email']))
return 1;
} catch (RegistrationException $e) {
+ error_log('SAMLAuth cannot register username "' . $elgg_user['usernane'] . '", it exists already.');
return true;
}
$user = get_user_by_username($elgg_user['username']);