Created
November 11, 2013 23:32
-
-
Save rpowis/7422559 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('init', 'myStartSession', 1); | |
add_action('wp_logout', 'myEndSession'); | |
add_action('wp_login', 'myEndSession'); | |
function myStartSession() { | |
if(!session_id()) { | |
session_start(); | |
} | |
} | |
function myEndSession() { | |
session_destroy (); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment