aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-27 01:19:24 -0800
committerfriendica <info@friendica.com>2013-01-27 01:19:24 -0800
commit28ab6d5bf508120956d575e260ed2fa2b8417e59 (patch)
tree2bb7a313ecfa5d900cd6a53dfe6fe926c4b7c8e4 /include
parent22bde9b2b797f17841f0ee12df1d12ea9616216f (diff)
downloadvolse-hubzilla-28ab6d5bf508120956d575e260ed2fa2b8417e59.tar.gz
volse-hubzilla-28ab6d5bf508120956d575e260ed2fa2b8417e59.tar.bz2
volse-hubzilla-28ab6d5bf508120956d575e260ed2fa2b8417e59.zip
lostpass fixes and login/logout flow if authenticated but no default channel exists
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) {