aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/auth.php17
-rw-r--r--include/nav.php7
2 files changed, 22 insertions, 2 deletions
diff --git a/include/auth.php b/include/auth.php
index a0244571b..e8cee3918 100644
--- a/include/auth.php
+++ b/include/auth.php
@@ -61,6 +61,13 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
$_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $a->user['nickname'];
+ $r = q("SELECT `uid`,`username` FROM `user` WHERE `password` = '%s' AND `email` = '%s'",
+ dbesc($a->user['password']),
+ dbesc($a->user['email'])
+ );
+ if(count($r))
+ $a->identities = $r;
+
$r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
intval($_SESSION['uid']));
if(count($r)) {
@@ -192,7 +199,15 @@ else {
$a->timezone = $a->user['timezone'];
}
- $r = q("SELECT * FROM `contact` WHERE `uid` = %s AND `self` = 1 LIMIT 1",
+ $r = q("SELECT `uid`,`username` FROM `user` WHERE `password` = '%s' AND `email` = '%s'",
+ dbesc($a->user['password']),
+ dbesc($a->user['email'])
+ );
+ if(count($r))
+ $a->identities = $r;
+
+
+ $r = q("SELECT * FROM `contact` WHERE `uid` = %d AND `self` = 1 LIMIT 1",
intval($_SESSION['uid']));
if(count($r)) {
$a->contact = $r[0];
diff --git a/include/nav.php b/include/nav.php
index bfbc10f5a..043cf0f7f 100644
--- a/include/nav.php
+++ b/include/nav.php
@@ -25,7 +25,9 @@ function nav(&$a) {
*
*/
- $a->page['nav'] .= '<div id="site-location">' . substr($a->get_baseurl(),strpos($a->get_baseurl(),'//') + 2 ) . '</div>';
+ $myident = ((is_array($a->user) && isset($a->user['nickname'])) ? $a->user['nickname'] . '@' : '');
+
+ $a->page['nav'] .= '<div id="site-location">' . $myident . substr($a->get_baseurl(),strpos($a->get_baseurl(),'//') + 2 ) . '</div>';
/**
@@ -98,6 +100,9 @@ function nav(&$a) {
$a->page['nav'] .= '<a id="nav-messages-link" class="nav-commlink" href="message">' . t('Messages')
. '</a><span id="mail-update" class="nav-ajax-left"></span>' . "\r\n";
+ if(is_array($a->identities) && count($a->identities) > 1) {
+ $a->page['nav'] .= '<a id="nav-manage-link" class="nav-commlink" href="manage">' . t('Manage') . '</a>' . "\r\n";
+ }
$a->page['nav'] .= '<a id="nav-settings-link" class="nav-link" href="settings">' . t('Settings') . "</a>\r\n";