Twitter: remove user from database even when he logged out before sending #pin
This commit is contained in:
parent
d3387ffd20
commit
6f9fbae090
1 changed files with 4 additions and 1 deletions
|
@ -156,10 +156,13 @@ void TwitterPlugin::handleLoginRequest(const std::string &user, const std::strin
|
|||
// User logging out
|
||||
void TwitterPlugin::handleLogoutRequest(const std::string &user, const std::string &legacyName)
|
||||
{
|
||||
if(onlineUsers.count(user)) {
|
||||
if (userdb.count(user)) {
|
||||
delete userdb[user].sessions;
|
||||
userdb[user].sessions = NULL;
|
||||
userdb[user].connectionState = DISCONNECTED;
|
||||
}
|
||||
|
||||
if(onlineUsers.count(user)) {
|
||||
onlineUsers.erase(user);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue