summaryrefslogtreecommitdiff
path: root/www/functions/func_register.php
diff options
context:
space:
mode:
authorHorus32014-03-16 20:56:12 +0100
committerHorus32014-03-16 20:56:12 +0100
commite6f9dea9a5a3c450847cdf1a11f77633fca09e43 (patch)
treeca6f17d3b6454b0d13135db5f950445e5bf3f3de /www/functions/func_register.php
parent9aa537cfa66b626987556ec870f3c674b03ff30e (diff)
downloadfiles.iamfabulous.de-e6f9dea9a5a3c450847cdf1a11f77633fca09e43.tar.gz
Added database query for login purposes.
Diffstat (limited to 'www/functions/func_register.php')
-rwxr-xr-xwww/functions/func_register.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/www/functions/func_register.php b/www/functions/func_register.php
index e7c5536..b089e24 100755
--- a/www/functions/func_register.php
+++ b/www/functions/func_register.php
@@ -48,7 +48,7 @@ function register($db){
$id_ar = $id_db->fetchArray(SQLITE3_NUM);
$id = $id_ar[0];
- /*Generates the encrypted password and the database transactions*/
+ /*Generates the encrypted password and the database transaction*/
$pepper = file_get_contents("../database/pepper.txt");
$password = $cleartext_password . $pepper;
@@ -59,6 +59,7 @@ function register($db){
BEGIN TRANSACTION;
UPDATE user SET name='" . $safe_name . "', password='" . $hash_password . "', invites=5, status=1, register=(SELECT datetime()) WHERE id=" . $id . ";
INSERT INTO files (id, parent, owner, name, folder, mime, size, share, size, hash) VALUES (NULL, 0, $id, '/', 'DIRECTORY', NULL, NULL, 'PUBLIC', 0, '');
+ INSERT INTO log (id, user, login) VALUES (NULL, (SELECT id FROM user WHERE name='" . $safe_name"'), (SELECT datetime()));
COMMIT;")
){