-
-
Save Pebblo/b6e20b03c57efe693bd86ebcf1b00ce9 to your computer and use it in GitHub Desktop.
Change the EE session lifepsan time
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
<?php //Please do not ad the opening PHP tag if you already have one. | |
function tw_ee_change_session_lifespan() { | |
// Set the value here to be the number of minutes you want the sesssion to be | |
// EE uses 60 buy default (1 hour) but here we change it to 15. Simply use another value for that lenth of time so, | |
// 15 = 15 minutes, 30 = 30 minutes etc | |
$minutes = 15; | |
//Return the number of minutes in seconds as that is what is used by PHP. | |
return $minutes * MINUTE_IN_SECONDS; | |
} | |
add_filter( 'FHEE__EE_Session__construct___lifespan', 'tw_ee_change_session_lifespan'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment