Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Storing user phlq result row in session for member login

Hello,

Last project I store member database object in session. It was very useful. When member data needs update (which in my case a lot) it was suberbly easy.

Is there any problem about this ? Em I missing someting ?

My Best Regards



30.0k

Hi,

what is exactly your problem ?

From controller:

$this->session->set('user',$result)

Whats your problem ?



5.4k

Hello, thanks for reply. I use it without any problem however I do not know is there anything against ? Is it a good practice ?



99.6k
Accepted
answer

Its fine practice - you dont have to select user again. But you have to remember updating it. Maybe implement some behaviour in user class ? That will check if updated user id is user id from session it will reset it ?