Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Using Sessions to Determine Login and User Role Reply To: Using Sessions to Determine Login and User Role

#155399
__
Participant

Is it safe to store things like the username AND the role in the Session data

Yeah, sure. Strictly speaking, it’s less secure that storing it in a DB, especially on a shared host where everyone has access to the same /tmp directory, but you can specify a different location to write the session files.

Is there a way to search the PHP forums on here? I couldn’t see it, maybe I’m blind.

Search button is at the upper right-hand corner. After clicking it, there are options along the bottom to narrow your search to particular sections of the site (“Forums,” in this case).