summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Cody <codeman@gentoo.org>2006-06-14 01:52:27 +0000
committerPreston Cody <codeman@gentoo.org>2006-06-14 01:52:27 +0000
commit0c2e2d1858d1f0035110f66484806ed316e7351a (patch)
tree0cfe8650437ca99ccdac7fcdd078872267de25d0 /scire/login.php
parentput the afterlogin redirect in the right place :P (diff)
downloadscire-0c2e2d1858d1f0035110f66484806ed316e7351a.tar.gz
scire-0c2e2d1858d1f0035110f66484806ed316e7351a.tar.bz2
scire-0c2e2d1858d1f0035110f66484806ed316e7351a.zip
various updates around the board. mainly focusing on client and user
pages. some DB updates and asthetic changes. preparing for user sessions svn path=/; revision=99
Diffstat (limited to 'scire/login.php')
-rw-r--r--scire/login.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/scire/login.php b/scire/login.php
index 6f8532b..7ec1f3f 100644
--- a/scire/login.php
+++ b/scire/login.php
@@ -37,12 +37,14 @@ if (isset($session->error)) {
if ($_GET['logout']) {
unset($_SESSION['userid']);
+ unset($_SESSION['username']);
}
if ($_POST['username']) {
$user = $db->select(array('username','password'), "users", "username='".$_POST['username']."'");
if($user[0]['username']) {
if ($_POST['passwd'] and (crypt($_POST['passwd'],447470567) == $user[0]['password'])) {
- $_SESSION['userid'] = $user[0]['username'];
+ $_SESSION['userid'] = $user[0]['userid'];
+ $_SESSION['username'] = $user[0]['username'];
header("Location: " . ($_GET['afterlogin'] ? $_GET['afterlogin'] : "index.php"));
exit;
} else {