Welcome Guest, Not a member yet? Register   Sign In
error while running install.sql in community auth
#8

(06-01-2018, 06:41 AM)richb201 Wrote: I did what you suggested. I am still getting:
A Database Error Occurred
Error Number: 1054
Unknown column 'user_id' in 'where clause'
SELECT * FROM `users` WHERE `user_id` = 779771974
Filename: C:/xampp/htdocs/sub_crud2/system/database/DB_driver.php
Line Number: 691

when I run localhost/Examples/create_user from the address bar on the browser.
I have traced through the error to the call to
$user_data['user_id']    = $this->examples_model->get_unused_id();

at the point of calling this line above, $this is full of data. Yet when I set a breakpoint in the function get_unused_id()and I look at $this, it is empty. So the line in get_unused_id():

       $query = $this->db->where( 'user_id', $random_unique_int )
           ->get_where( $this->db_table('user_table') );

fails because $this only has one value which is "acl". I have no idea why $this is empty or what acl is.

Any idea what is going on?

Another hint.  I just tried running login from the "http://localhost/index.php/login?redirect=Examples%2Findex"

I get this error:
Error Number: 1054
Unknown column 'auth_level' in 'field list'
SELECT `username`, `email`, `auth_level`, `passwd`, `user_id`, `banned` FROM `users` WHERE LOWER( username ) = '[email protected]' OR LOWER( email ) = '[email protected]' LIMIT 1
Filename: C:/xampp/htdocs/sub_crud2/system/database/DB_driver.php
Line Number: 691

It seems that the Community Auth is still trying to use the 'users' table instead of the ca_users table.  Here is my db_tables


// USER RELATED TABLES
$config['user_table']                   = 'ca_users';  /*modified 6/1/18 due to naming conflict */

// LOGIN ERROR RELATED TABLES
$config['errors_table']                 = 'login_errors';
$config['IP_hold_table']                = 'ips_on_hold';
$config['username_or_email_hold_table'] = 'username_or_email_on_hold';

proof that an old dog can learn new tricks
Reply


Messages In This Thread
RE: error while running install.sql in community auth - by richb201 - 06-01-2018, 07:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB