I currently have the core file Session.php
modified a little to keep track of login/logout information and member_id
s - create_new_session()
for login, destroy()
for logout.
I realize that this can be better achieved with an extension using hooks - member_member_login_single
after login, member_member_logout
after logout.
The issue, though, is with the logout hook the system doesn't pass along any data (documentation), so there's no way for us to know the member_id
of the user who just logged out.
Is there a way to accomplish this at all aside from modifying core files? I already have a hacky solution (editing core files), so I'm looking for the "right" way to do this.