So my question is very basic.
When checking if a user is still logged in on any page, I'll use
if (isset($_SESSION['user']) && $_SESSION['user'] == true) { CODE }
But, shouldn't I use a hashed value instead of a boolean value for the $_SESSION['user']? All the guides I find are using boolean values, but from my point of view that is a security leak, isn't it? People are talking about Session-Hjacking and Session-Fixation all the time, and that would be very easy if I just used boolean values for the user-session, woulnd't it? Or am I just mixing things up here?
Thank you
PHPSESSID. All it is is a 32 bit string of hex characters. That's ALL the information that the hijacker gets unless your program reveals more to them since they will essentially be logged in as the original user.