No, this is a good way to do this. A user cannot change the global $ _SESSION unless he has access to your server. Remember to stay away from cookies on the client side .
To make it even more secure, a good way is to keep the IP address and check that it remains unchanged between each request.
alexn source share