From bbe53699f26bfa4e4d17da097fd8f2fc14da47dd Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Mon, 19 Jul 2010 05:24:22 -0700 Subject: bug fixes --- include/auth.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/auth.php') diff --git a/include/auth.php b/include/auth.php index ef5c6f0b4..bbbe8eb0d 100644 --- a/include/auth.php +++ b/include/auth.php @@ -23,12 +23,20 @@ if((x($_SESSION,'authenticated')) && (! ($_POST['auth-params'] == 'login'))) { if(strlen($a->user['timezone'])) date_default_timezone_set($a->user['timezone']); + if(x($a->user,'nickname')) + $_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $r[0]['nickname']; + else + $_SESSION['my_url'] = $a->get_baseurl() . '/profile/' . $r[0]['uid']; + + + $r = q("SELECT * FROM `contact` WHERE `uid` = %s AND `self` = 1 LIMIT 1", intval($_SESSION['uid'])); if(count($r)) { $a->contact = $r[0]; $a->cid = $r[0]['id']; $_SESSION['cid'] = $a->cid; + } } } -- cgit v1.2.3