I am wondering what the risks are of storing the userid in a session?
then simply doing a
if(isset($_SESSION[\'user_id\'])){ login_user($_SESSION[
If some one can access your session, he can, probably, access much much more. I would not hash it and also make sure it does not get to the client