redirectToLogin() static public method

Redirection to Login page
static public redirectToLogin ( $params = '' ) : nothing
$params param to add to URL (default '')
return nothing
Example #1
0
 /**
  * Global check of session to prevent PHP vulnerability
  *
  * @since version 0.85
  *
  * @see https://wiki.php.net/rfc/strict_sessions
  **/
 static function checkValidSessionId()
 {
     if (!isset($_SESSION['valid_id']) || $_SESSION['valid_id'] !== session_id()) {
         Html::redirectToLogin('error=3');
     }
     return true;
 }