From 10e844653eb28dfcefa0c6aa6aa9909fd1625b6d Mon Sep 17 00:00:00 2001 From: REJack Date: Mon, 30 May 2016 17:12:02 +0200 Subject: [PATCH] added `date_created` field to `aauth_users`-table in both SQL files changed `create_user()` to fill `date_created` on user creation --- application/libraries/Aauth.php | 1 + sql/Aauth_v2.sql | 3 +-- sql/Aauth_v2_BCrypt.sql | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/application/libraries/Aauth.php b/application/libraries/Aauth.php index 46cdb62..d55b355 100644 --- a/application/libraries/Aauth.php +++ b/application/libraries/Aauth.php @@ -758,6 +758,7 @@ class Aauth { 'email' => $email, 'pass' => $this->hash_password($pass, 0), // Password cannot be blank but user_id required for salt, setting bad password for now 'name' => (!$name) ? '' : $name , + 'date_created' => date("Y-m-d H:i:s"), ); if ( $this->aauth_db->insert($this->config_vars['users'], $data )){ diff --git a/sql/Aauth_v2.sql b/sql/Aauth_v2.sql index a0a96a5..1d465b4 100644 --- a/sql/Aauth_v2.sql +++ b/sql/Aauth_v2.sql @@ -97,14 +97,13 @@ CREATE TABLE `aauth_users` ( `banned` tinyint(1) DEFAULT '0', `last_login` datetime DEFAULT NULL, `last_activity` datetime DEFAULT NULL, - `last_login_attempt` datetime DEFAULT NULL, + `date_created` datetime DEFAULT NULL, `forgot_exp` text COLLATE utf8_general_ci, `remember_time` datetime DEFAULT NULL, `remember_exp` text COLLATE utf8_general_ci, `verification_code` text COLLATE utf8_general_ci, `totp_secret` varchar(16) COLLATE utf8_general_ci DEFAULT NULL, `ip_address` text COLLATE utf8_general_ci, - `login_attempts` int(11) DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci; diff --git a/sql/Aauth_v2_BCrypt.sql b/sql/Aauth_v2_BCrypt.sql index d128399..572504d 100644 --- a/sql/Aauth_v2_BCrypt.sql +++ b/sql/Aauth_v2_BCrypt.sql @@ -97,14 +97,13 @@ CREATE TABLE `aauth_users` ( `banned` tinyint(1) DEFAULT '0', `last_login` datetime DEFAULT NULL, `last_activity` datetime DEFAULT NULL, - `last_login_attempt` datetime DEFAULT NULL, + `date_created` datetime DEFAULT NULL, `forgot_exp` text COLLATE utf8_general_ci, `remember_time` datetime DEFAULT NULL, `remember_exp` text COLLATE utf8_general_ci, `verification_code` text COLLATE utf8_general_ci, `totp_secret` varchar(16) COLLATE utf8_general_ci DEFAULT NULL, `ip_address` text COLLATE utf8_general_ci, - `login_attempts` int(11) DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;