facebook/php-sdk — pull request #512 by estelsmith (2012-01-11 14:50:30+00:00)
Title: Fixed an issue with BaseFacebook::destroySession() breaking BaseFacebook::getUser()

BaseFacebook::destroySession() used to set BaseFacebook::user to 0. This caused issues with getUser(), as it specifically checks if the value is NULL to determine whether or not to pull the current user ID from the API.

I changed destroySession() to set BaseFacebook::user to NULL, so getUser() will re-retrieve the logged in user after destroySession() is called.

This will allow a user of the API to call destroySession(), then change the access token via setAccessToken() and determine who the access token belongs to.