Welcome Guest, Not a member yet? Register   Sign In
flexi auth - A user authentication library for CodeIgniter
#26

[eluser]haseydesign[/eluser]
Hey again Klausch,
It's good to see you're making some progress with the library.

Regarding the last Git commit, the only difference was a quick update to the demo sql dump, that would fix the incorrect login details for the 'public' user.
You can see the change highlighted @ https://github.com/haseydesign/flexi-aut...03ea9515c2

You would only need to update this if you're using the demo sql data.
In which case if you could also just use the following sql to update your existing database data.
Code:
UPDATE `user_accounts`
SET `uacc_password` = '$2a$08$GlxQ00VKlev2t.CpvbTOlepTJljxF2RocJghON37r40mbDl4vJLv2',
    `uacc_salt` = 'CDNFV6dHmn'
WHERE `uacc_id` = 3;

----------------------------------------------------

Regarding the error with the custom user data, I think you're using the wrong function for the table you are targeting.

The 'insert_custom_user_data()' and 'update_custom_user_data()' functions are only for updating data within custom user tables that you have added.

If you have just added additional columns to the main user account table, then you need to define the column name and value via the 'user_data' argument in both the 'insert_user()' and 'update_user()' functions.

Function references:
http://haseydesign.com/flexi-auth/user_g...nsert_user
http://haseydesign.com/flexi-auth/user_g...pdate_user

So if for example you had a custom column within the main user account table named 'column_1' and 'column_2, you would update that column with the following code.
Code:
$user_id = 101;
$user_data = array('column_1' => 'Column Data #1', 'column_2' => 'Column Data #2');

update_user($user_id, $user_data);

Note: Ensure you have defined these custom columns in the flexi auth config file via the following setting:
Code:
$config['database']['user_acc']['custom_columns'] = array('column_1', 'column_2');



Messages In This Thread
flexi auth - A user authentication library for CodeIgniter - by El Forum - 09-26-2012, 06:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB