Welcome Guest, Not a member yet? Register   Sign In
Community Auth Issue
#9

(08-31-2017, 02:24 AM)sasbass Wrote: Hi,  jaystream ,
I too download your file and try to login.
But I saw some problems when can try to login with ajax login.

A Database Error Occurred

Error Number: 1048

Column 'id' cannot be null

INSERT INTO `auth_sessions` (`id`, `user_id`, `login_time`, `ip_address`, `user_agent`) VALUES (NULL, '2664792807', '2017-08-31 11:15:44', '::1', 'Chrome 60.0.3112.113 on Windows 7')

Filename: D:/xampp/htdocs/sites/community_auth/system/database/DB_driver.php

Line Number: 691

The problem for this is coming from id cannot be null.
you can change this table:

CREATE TABLE `auth_sessions` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `user_id` int(10) unsigned NOT NULL,
 `login_time` datetime DEFAULT NULL,
 `modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 `ip_address` varchar(45) NOT NULL,
 `user_agent` varchar(60) DEFAULT NULL,
 PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

Hi sasbass,

Yeah, that is my issue trying to resolve. That error will appear if there is a `CI_Session` already loaded before the Community Auth. I have the library installed that loads the session in the `__construct()` function. You can eliminate that error by commenting out this line of code 
Code:
$this->xwb->load->library('session');

In the application/libraries/Lib.php.
But I can not do that because the library needs the session every page load.
My Question is how to use the Community Auth together with the library that has an autoload session?
-jaystream
Reply


Messages In This Thread
Community Auth Issue - by jaystream - 08-27-2017, 03:40 AM
RE: Community Auth Issue - by skunkbad - 08-27-2017, 03:10 PM
RE: Community Auth Issue - by jaystream - 08-28-2017, 04:44 PM
RE: Community Auth Issue - by skunkbad - 08-28-2017, 11:36 PM
RE: Community Auth Issue - by jaystream - 08-30-2017, 08:36 AM
RE: Community Auth Issue - by skunkbad - 08-30-2017, 05:19 PM
RE: Community Auth Issue - by jaystream - 08-31-2017, 01:42 AM
RE: Community Auth Issue - by sasbass - 08-31-2017, 02:24 AM
RE: Community Auth Issue - by jaystream - 08-31-2017, 02:50 AM
RE: Community Auth Issue - by skunkbad - 08-31-2017, 11:02 AM
RE: Community Auth Issue - by jaystream - 08-31-2017, 05:21 PM
RE: Community Auth Issue - by dave friend - 09-05-2017, 02:26 PM
RE: Community Auth Issue - by jaystream - 09-05-2017, 05:43 PM
RE: Community Auth Issue - by bocahapi - 12-05-2017, 04:06 PM
RE: Community Auth Issue - by skunkbad - 12-05-2017, 06:12 PM
RE: Community Auth Issue - by bocahapi - 12-09-2017, 05:39 PM
RE: Community Auth Issue - by skunkbad - 12-09-2017, 09:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB