doc->addChild('content'); $content->addChild('p', 'Welcome to Pleasant SSO!'); $identity = $session->getIdentity(); $content->addChild('pre', 'Your identity: ' . print_r($identity, true)); if ($identity === null) { $link = $content->addChild('a', L('login.title')); $link->addAttribute('href', '/login'); } else { $link = $content->addChild('a', L('logout.title')); $link->addAttribute('href', '/logout'); } $resp->send(); }