Remove CWebSock::m_bLoggedIn

We can just check if m_pUser is NULL for the very same thing.


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1859 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2010-03-30 12:20:31 +00:00
parent 4d149f3d5f
commit ba05f11ea4
2 changed files with 2 additions and 7 deletions

View File

@@ -28,7 +28,6 @@ bool CZNCTagHandler::HandleTag(CTemplate& Tmpl, const CString& sName, const CStr
}
CWebSession::CWebSession(const CString& sId) : m_sId(sId) {
m_bLoggedIn = false;
m_pUser = NULL;
}
@@ -83,7 +82,6 @@ void CWebAuth::AcceptedLogin(CUser& User) {
CSmartPtr<CWebSession> spSession = m_pWebSock->GetSession();
spSession->SetUser(&User);
spSession->SetLoggedIn(true);
m_pWebSock->SetLoggedIn(true);
m_pWebSock->UnPauseRead();
@@ -99,7 +97,6 @@ void CWebAuth::RefusedLogin(const CString& sReason) {
spSession->AddError("Invalid login!");
spSession->SetUser(NULL);
spSession->SetLoggedIn(false);
m_pWebSock->SetLoggedIn(false);
m_pWebSock->UnPauseRead();
@@ -534,7 +531,7 @@ CWebSock::EPageReqResult CWebSock::OnPageRequestInternal(const CString& sURI, CS
} else if (sURI == "/robots.txt") {
return PrintStaticFile("/pub/robots.txt", sPageRet);
} else if (sURI == "/logout") {
GetSession()->SetLoggedIn(false);
GetSession()->SetUser(NULL);
SetLoggedIn(false);
Redirect("/");