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

(This post was last modified: 06-16-2018, 01:43 AM by richb201.)

I went back to putting Community Auth in my code. I am again having a problem with the table called "users" when running create_user. I have tracked the problem down to Form_validation.php. Just to remind you, I changed the sql script to create a community auth table called users2 instead of users and also put this line in my config/db_tables

// USER RELATED TABLES
$config['user_table']                   = 'users2';

Yet, when executing the validation routine, _execute, and running this line:

$this->_execute($row, $row['rules'], $row['postdata']);

$row['rules] is "is_unique[users.username]" . Shouldn't this be users2.username ??

I narrowed this down to the validation_rules in Examples.php
'field'  => 'email',
'label'  => 'email',
'rules'  => 'trim|required|valid_email|is_unique[' . db_table('user_table') . '.email]',   <<<this line
'errors' => [
  'is_unique' => 'Email address already in use.'
]



.db_table('user_table') is inserting 'users' instead of 'users2". why would this be if $config['user_table'] is being set to 'users2'? Is there any additional configuration I need to do? 
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-16-2018, 12:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB