mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -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("/");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user