summaryrefslogtreecommitdiff
path: root/www/functions/func_login.php
diff options
context:
space:
mode:
authorHorus32014-03-12 22:11:50 +0100
committerHorus32014-03-12 22:11:50 +0100
commit2f0f4ca056f92ffd2bbf80e7b7c49b489d6e7ed4 (patch)
treeb14d63c782c3088d904858140d947492d946e29f /www/functions/func_login.php
parent478a6dbc03c1ed65f5a187a6752bc130d3b82ac3 (diff)
downloadfiles.iamfabulous.de-2f0f4ca056f92ffd2bbf80e7b7c49b489d6e7ed4.tar.gz
more modular for greater flexibility
Diffstat (limited to 'www/functions/func_login.php')
-rw-r--r--www/functions/func_login.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/www/functions/func_login.php b/www/functions/func_login.php
index f528076..1b9188e 100644
--- a/www/functions/func_login.php
+++ b/www/functions/func_login.php
@@ -27,9 +27,11 @@ function login($db){
INSERT INTO log (id, user, login) VALUES (NULL, (SELECT id FROM user WHERE name='" . $username . "'), (SELECT datetime()) );
COMMIT;
")){
+ $id = user($db, $username);
$_SESSION["login"] = true;
$_SESSION["username"] = $username;
+ $_SESSION["userid"] = $id;
header("Refresh: 0; /");
return true;