aboutsummaryrefslogtreecommitdiff
path: root/www/setup.php
diff options
context:
space:
mode:
authorHorus32014-04-15 15:14:05 +0200
committerHorus32014-04-15 15:14:05 +0200
commit0af7fafcd5a61eb1bd81c21eb93a99e3a4374648 (patch)
treec88926188f167c4782ad27afa16a3a721fa051be /www/setup.php
parent12734da8826299ffd24c0a15f6dbf205892d7221 (diff)
downloadjungegemeinde-0af7fafcd5a61eb1bd81c21eb93a99e3a4374648.tar.gz
Logs every failed log in attempt. Allows log in from special user using a specific email.
Diffstat (limited to 'www/setup.php')
-rwxr-xr-xwww/setup.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/www/setup.php b/www/setup.php
index 3e8ca76..7b691df 100755
--- a/www/setup.php
+++ b/www/setup.php
@@ -55,7 +55,7 @@ if($bool){
CREATE TABLE IF NOT EXISTS user (id INTEGER PRIMARY KEY, name TEXT UNIQUE, password TEXT, email TEXT UNIQUE, status INTEGER, register INTEGER);
INSERT INTO user (id, name, status, password, email, register) VALUES (NULL, 'admin', 0, '" . $hash_password . "', '" . $email . "', (SELECT strftime('%s', 'now')));
CREATE TABLE IF NOT EXISTS log (id INTEGER PRIMARY KEY, user INTEGER, login INTEGER, FOREIGN KEY(user) REFERENCES user(id));
- CREATE TABLE IF NOT EXISTS banned_user (id INTEGER PRIMARY KEY, ip TEXT, session_id TEXT, time INTEGER);
+ CREATE TABLE IF NOT EXISTS banned_user (id INTEGER PRIMARY KEY, login_attempts INTEGER, ip TEXT, session_id TEXT, time INTEGER, user INTEGER);
CREATE TABLE IF NOT EXISTS jg(id INTEGER PRIMARY KEY, name TEXT, adresse TEXT, telefonnummer INTEGER, handynummer INTEGER, email TEXT, geburtstag TEXT);
CREATE TRIGGER IF NOT EXISTS delete_files AFTER DELETE ON user FOR EACH ROW BEGIN DELETE FROM files WHERE owner=OLD.id; END;
COMMIT;")