We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Storing user phlq result row in session for member login


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



what is exactly your problem ?

From controller:


Whats your problem ?


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


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 ?