aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/auth.php2
-rw-r--r--include/nav.php7
2 files changed, 8 insertions, 1 deletions
diff --git a/include/auth.php b/include/auth.php
index 68dc9308f..14751f5a2 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -39,9 +39,11 @@ function account_verify_password($email,$pass) {
foreach($r as $record) {
if(($record['account_flags'] == ACCOUNT_OK) || ($record['account_flags'] == ACCOUNT_UNVERIFIED)
&& (hash('whirlpool',$record['account_salt'] . $pass) === $record['account_password'])) {
+ logger('password verified for ' . $email);
return $record;
}
}
+ logger('password failed for ' . $email);
return null;
}
diff --git a/include/nav.php b/include/nav.php
index 3a565af55..73421beab 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -80,7 +80,12 @@ EOT;
}
else {
- $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in'));
+ if(! get_account_id())
+ $nav['login'] = Array('login',t('Login'), ($a->module == 'login'?'selected':''), t('Sign in'));
+ else
+ $nav['alogout'] = Array('logout',t('Logout'), "", t('End this session'));
+
+
}
if($observer) {