aboutsummaryrefslogtreecommitdiffstats
path: root/include/auth.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-03-01 20:18:47 -0800
committerFriendika <info@friendika.com>2011-03-01 20:18:47 -0800
commit377f991ac5b1e8c3c679fbbc5e138256bc24715b (patch)
tree7194d35eec60763cf754ed82d36aaf9737e13862 /include/auth.php
parent5ff1462e1e98e97f623022c23deea0147c62327b (diff)
downloadvolse-hubzilla-377f991ac5b1e8c3c679fbbc5e138256bc24715b.tar.gz
volse-hubzilla-377f991ac5b1e8c3c679fbbc5e138256bc24715b.tar.bz2
volse-hubzilla-377f991ac5b1e8c3c679fbbc5e138256bc24715b.zip
switch identities to manage pages
Diffstat (limited to 'include/auth.php')
-rw-r--r--include/auth.php17
1 files changed, 16 insertions, 1 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];