'.$_SESSION['user'].' is now logged out

'; $_SESSION['user']=''; } else { $auth_html.='

Currently logged in as '.$_SESSION['user'].'.

'; } } else { // not already logged in try { if(!isset($_GET['openid_mode'])) { if(isset($_POST['openid_identifier'])) { $openid = new LightOpenID; $openid->identity = $_POST['openid_identifier']; header('Location: ' . $openid->authUrl()); } $auth_html.='
OpenID:
'; } elseif($_GET['openid_mode'] == 'cancel') { $auth_html.='

User has canceled authentication!

'; } else { $openid = new LightOpenID; if ($openid->validate()) { // is logged in global $users; include_once('passwd.php'); if (in_array($openid->identity,$users)) { $_SESSION['user']=$openid->identity; $auth_html.='

Welcome, '.$_SESSION['user'].'!

'; } else { $auth_html.='

Authentication was successful, but '.$openid->identity.' is not an authorized user.

'; } } else { // is not logged in $auth_html.='

User '.$openid->identity.' is not logged in

'; } } } catch(ErrorException $e) { $auth_html.=$e->getMessage(); } } // END AUTH CODE ///////////////////////////////////////////////////////////////