This file contains hidden or 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 | |
| return (new PhpCsFixer\Config()) | |
| ->setRules([ | |
| '@PSR2' => true, | |
| 'array_indentation' => true, | |
| 'array_syntax' => ['syntax' => 'short'], | |
| 'combine_consecutive_unsets' => true, | |
| 'phpdoc_separation' => true, | |
| 'multiline_whitespace_before_semicolons' => true, |
This file contains hidden or 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 | |
| //on pageload, we have to start the session. | |
| session_start(); | |
| $idletime=60;// after 60 seconds the user gets logged out, put your time in seconds. | |
| if (time()-$_SESSION['timestamp']>$idletime){ | |
| session_destroy(); | |
| session_unset(); | |
| header('Location: ../index.php'); //then redirect the user away from the current page to a lockscreen page or index. |