I m trying to use LightOpenId for my site to log-in/log-out users. This works fine but my question is \"How can I track user log-in/log-out status and take respective action
Your question has actually nothing to do with OpenID.
OpenID is an authentication protocol, meaning that it only checks whether the user really is who he claims to be -- in the same sense that asking for a password checks that. It has nothing do to with your user being logged in or out.
In order to keep track of your user's session you need to, well, use sessions. For example, after validation:
validate()) {
// User has logged in
$_SESSION['identity'] = $openid->identity;
}
?>
Then when you want to check whether your user is logged in (and who is he):
And for the sake of completion, when logging out:
If you don't know how to use sessions, you can find more information in the manual.