dpacmittal Posted December 17, 2009 Share Posted December 17, 2009 I am making a user class for my script which stores all the user information in sessions. It takes user id as parameter and gets the info from database and stores it in the session variable. I did this for easy access of data as I don't want to query database every now and then. Is this a good practice? If not, why? Link to comment https://forums.phpfreaks.com/topic/185458-is-it-a-good-practice-to-store-user-info-in-sessions/ Share on other sites More sharing options...
Adam Posted December 17, 2009 Share Posted December 17, 2009 It takes user id as parameter and gets the info from database I'm guessing you meant user ID and password? But yeah, this is pretty common practice. Link to comment https://forums.phpfreaks.com/topic/185458-is-it-a-good-practice-to-store-user-info-in-sessions/#findComment-979120 Share on other sites More sharing options...
mrMarcus Posted December 17, 2009 Share Posted December 17, 2009 make sure to treat sensitive information accordingly appropriately whilst storing in formation in session vars or cookies for that matter. Link to comment https://forums.phpfreaks.com/topic/185458-is-it-a-good-practice-to-store-user-info-in-sessions/#findComment-979132 Share on other sites More sharing options...
dpacmittal Posted December 17, 2009 Author Share Posted December 17, 2009 Thanks guys. Link to comment https://forums.phpfreaks.com/topic/185458-is-it-a-good-practice-to-store-user-info-in-sessions/#findComment-979136 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.