Shysh,
if (!$systemUser->id) {
$SPF = $_SERVER['PHP_SELF'];
if ($SPF == '/login.php' || $SPF == '/profile/skl.php' || $SPF == '/registration/index.php') {
} else {
header("Location: http://{$_SERVER['HTTP_HOST']}/login.php");
exit;
}
}