function fbc_disconnectFromFacebook() { $this->fbc_email = $this->fbc_getFacebookUserEmailHashes($this->fbc_uid); if ($this->fbc_email) { try { facebook_unregisterUsers($this->fbc_email); } catch (Exception $e) { // PROBABLY AN EXPIRED SESSION return null; } } else { return FALSE; } $this->fbc_uid = 0; return TRUE; }
function delete() { // Delete the account from the db $ret = queryf('DELETE FROM users WHERE username = %s', $this->username); if (!$ret) { error_log("Could not delete account ({$this->username})"); return false; } // Unregister the account from fb return facebook_unregisterUsers(array(email_get_public_hash($this->email))); }