Hi!
The code of the project in the commit Sessions-Logout (https://github.com/spbooks/phpmysql6/tree/Sessions-Logout) has a bug, because the logout functionality doesn’t work correctly – it is still possible to edit / add / delete the jokes after logging out?
@Mittineague (I assume, without the book, that) it’s more that the lesson is about logging people out, not securing the other pages against non-logged-in people. There are no controls (at this point in the book) on add/edit/delete jokes to ensure a user is logged in.
It’s a logical concern, but not the point of the lesson. I assume that @TomB goes on from this lesson to explain what you should DO when someone is not logged in and attempts to access the functions that only logged in people are meant to access.
I’ll also be honest and trying to find anything in this design paradigm is confusing me to the ends of the earth and very difficult to follow the flow, so perhaps i’m mistaken.
as Mittineague says, this was fixed in the code in the book, and in the the code, unfortunately it wasn’t applied to all the relevant branches.
If you’re browsing the forums there’s an advert to get it for free, so you should just be able to enter your email and get a copy I’m not sure if I’m seeing that advert because my account is flagged as an author though.
I see that from time to time, though I seem to recall when I tried it, it rejected my email for some reason. If it pops up again, I’ll try it and provide more detail somewhere if it fails.