[eluser]Andy78[/eluser]
Is the meta table still used in V2? I have a large amount of fields to add and dont want them to go in the users table.
As far as I can tell I have set up everything correctly but it is not storing the additional data in the meta table.
Forexample in my ion_auth config file I have the following:
Code:
/*
| -------------------------------------------------------------------------
| Tables.
| -------------------------------------------------------------------------
| Database table names.
*/
$config['tables']['users'] = 'users';
$config['tables']['groups'] = 'groups';
$config['tables']['users_groups'] = 'users_groups';
$config['tables']['login_attempts'] = 'login_attempts';
$config['tables']['meta'] = 'users_profiles';
/*
| Users table column and Group table column you want to join WITH.
|
| Joins from users.id
| Joins from groups.id
*/
$config['join']['users'] = 'user_id';
$config['join']['groups'] = 'group_id';
$config['join']['meta'] = 'user_id';
/**
* Columns in your meta table,
* id not required.
**/
$config['columns'] = array('gender','dateofbirth','ethnicity');
In my data base I have a table called users_profiles that contains the fields
and in my controller I have the following just to test:
Code:
function add_admin_user(){
$sections = array(
'config' => TRUE,
'queries' => TRUE
);
$this->output->enable_profiler(TRUE);
$this->output->set_profiler_sections($sections);
$username = 'benedmunds';
$password = '12345678';
$email = '[email protected]';
$additional_data = array(
'gender' => 'Male',
'dateofbirth' => '1978-04-21',
'ethnicity' => 'white'
);
$group = array('1'); // Sets user to admin. No need for array('1', '2') as user is always set to member by default
$this->ion_auth->register($username, $password, $email, $additional_data, $group);
Any ideas?