[eluser]kaejiavo[/eluser]
Hi Ben,
first i would like to say thank you for this very awesome library.
It saved me lots of work and trouble. To be honest, my php knowledge is not sufficient to come up with a secure auth system.
Now i come with a performance issue / question to you:
I need to fetch the user array on each of my pages as i have a strongly personalized site. Also on each page i update a 'meta' field with a timestamped (last_clicked).
So i have basically:
$this->user = $this->ion_auth->get_user_array();
...
$this->ion_auth->update_user($data);
And i have some pages on my site where even another update_user() is needed.
Now, what i figured out is that ion_auth_model->update_user($data) at first fetches the user data from the database ($user = $this->get_user($id)->row()
, so i have up to 3 or 4 times on a page a db access for the user.
I don't exactly understand what the update_user function does with the user data, but i have a feeling that these checks are not needed, if only the meta data shall be updated. So is there any way, that you add an update_user_meta() function into the library?
I have added one into my controller, but it seems missing to me in the lib.
Quite a long explanation, hope i made my point clear enough.
Marco