CodeIgniter-Authit icon indicating copy to clipboard operation
CodeIgniter-Authit copied to clipboard

Last login error

Open rodrigoarreola opened this issue 8 years ago • 3 comments

I'm getting a data base error when I try to create a new user because it says that the last_login variable is null but shouldn't be

rodrigoarreola avatar Jan 18 '18 21:01 rodrigoarreola

I am wondering if this has to do with, in "models/Authit_model.php" you should add the last_login key (line 54):
public function create_user($email, $password) { $data = array( 'email' => filter_var($email, FILTER_SANITIZE_EMAIL), 'password' => $password, // Should be hashed 'created' => date('Y-m-d H:i:s'), 'last_login' => date('Y-m-d H:i:s') ); $this->db->insert($this->users_table, $data); return $this->db->insert_id(); }

Can you let me know if this works? and I will update.

trafficinc avatar Jan 19 '18 00:01 trafficinc

Yeah, was that now works like a charm.

Thank you.

rodrigoarreola avatar Jan 19 '18 00:01 rodrigoarreola

No problem, thanks

trafficinc avatar Jan 19 '18 01:01 trafficinc