lots of work, 2way friends, comments...

This commit is contained in:
Mike Macgirvin 2010-07-05 21:39:55 -07:00
parent 3713a9291c
commit 6817c5d59a
15 changed files with 335 additions and 159 deletions

View file

@ -8,6 +8,7 @@ if((x($_SESSION,'authenticated')) && (! ($_POST['auth-params'] == 'login'))) {
unset($_SESSION['uid']);
unset($_SESSION['visitor_id']);
unset($_SESSION['administrator']);
unset($_SESSION['cid']);
$_SESSION['sysmsg'] = "Logged out." . EOL;
goaway($a->get_baseurl());
}
@ -21,6 +22,12 @@ if((x($_SESSION,'authenticated')) && (! ($_POST['auth-params'] == 'login'))) {
if(strlen($a->user['timezone']))
date_default_timezone_set($a->user['timezone']);
$r = q("SELECT * FROM `contact` WHERE `uid` = %s AND `self` = 1 LIMIT 1",
intval($_SESSION['uid']));
if(count($r)) {
$a->cid = $r[0]['id'];
$_SESSION['cid'] = $a->cid;
}
}
}
else {
@ -28,6 +35,7 @@ else {
unset($_SESSION['uid']);
unset($_SESSION['visitor_id']);
unset($_SESSION['administrator']);
unset($_SESSION['cid']);
$encrypted = hash('whirlpool',trim($_POST['password']));
if((x($_POST,'auth-params')) && $_POST['auth-params'] == 'login') {
@ -52,6 +60,14 @@ else {
if(strlen($a->user['timezone']))
date_default_timezone_set($a->user['timezone']);
$r = q("SELECT * FROM `contact` WHERE `uid` = %s AND `self` = 1 LIMIT 1",
intval($_SESSION['uid']));
if(count($r)) {
$a->cid = $r[0]['id'];
$_SESSION['cid'] = $a->cid;
}
}
}