mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Webadmin: Display user's vhost too if it's not in the global vhost list
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@935 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -857,6 +857,7 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
|
||||
|
||||
// To change VHosts be admin or don't have DenySetVHost
|
||||
const VCString& vsVHosts = CZNC::Get().GetVHosts();
|
||||
bool bFoundVHost = false;
|
||||
if (IsAdmin() || !m_pSessionUser->DenySetVHost()) {
|
||||
for (unsigned int b = 0; b < vsVHosts.size(); b++) {
|
||||
const CString& sVHost = vsVHosts[b];
|
||||
@@ -866,8 +867,17 @@ bool CWebAdminSock::UserPage(CString& sPageRet, CUser* pUser) {
|
||||
|
||||
if (pUser && pUser->GetVHost() == sVHost) {
|
||||
l["Checked"] = "true";
|
||||
bFoundVHost = true;
|
||||
}
|
||||
}
|
||||
|
||||
// If our current vhost is not in the global list...
|
||||
if (!bFoundVHost && !pUser->GetVHost().empty()) {
|
||||
CTemplate& l = m_Template.AddRow("VHostLoop");
|
||||
|
||||
l["VHost"] = pUser->GetVHost();
|
||||
l["Checked"] = "true";
|
||||
}
|
||||
}
|
||||
|
||||
set<CModInfo> ssUserMods;
|
||||
|
||||
Reference in New Issue
Block a user