Browse Source

added `date_created` field to `aauth_users`-table in both SQL files

changed `create_user()` to fill `date_created` on user creation
develop
REJack 9 years ago
parent
commit
10e844653e
  1. 1
      application/libraries/Aauth.php
  2. 3
      sql/Aauth_v2.sql
  3. 3
      sql/Aauth_v2_BCrypt.sql

1
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 )){

3
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;

3
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;

Loading…
Cancel
Save