Session verificaton helper function #19
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: nu/CharmBoard#19
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Helper name should probably be
session_is_valid
orsession_verify
. Should output1
if session is valid andundef
if it is not.It should check the following:
If any of these are FALSE, then the session cookie and [if applicable] DB entry should also be destroyed.
Session should be verified before user is allowed to perform any actions only a logged in user would be able to perform, i.e. making a new thread or post, editing their profile, viewing a userclass-restricted forum [or threads within], etc.
Code should be written to allow multiple sessions per user, i.e. if one person is logged in across two devices (desktop and mobile or etc)
Should probably run on index too, since that will effect listing of userclass-restricted forums (once that feature is implemented)
And before even calling
$self->session_validate
there should first be a check that the user is even logged in at all, somewhat like this maybe:(I'm thinking session destruction will be built into
session_verify
instead of needing to be called separately)I think its fair to say this is done, despite the IP binding check not being implemented since, well, IP binding of sessions isn't implemented at all right now!