<img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/config.png" alt="" onclick="$('#<%=$this->Config->ClientID%>').click()" />
<com:TActiveLinkButton ID="Config" Text="<%[ Configuration ]%>" Attributes.onclick="PanelWindow.show('config'); return false;" />
<img src="<%=$this->getPage()->getTheme()->getBaseUrl()%>/logout.png" alt="" onclick="$('#<%=$this->Logout->ClientID%>').click()" />
- <com:TActiveLinkButton ID="Logout" Text="<%[ Logout ]%>" OnClick="logout" ClientSide.OnComplete="document.location.href = document.location.protocol + '//' + document.location.host;" />
+ <com:TActiveLinkButton ID="Logout" Text="<%[ Logout ]%>" OnCommand="Page.logout" />
</div>
<com:Application.Web.Portlets.TrayBar ID="TrayBar" />
</div>
}
public function logout($sender, $param) {
- $http_protocol = isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) ? 'https' : 'http';
- $fake_pwd = $this->getModule('web_config')->getRandomString();
- $this->switchToUser($http_protocol, $_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'], $this->User->getName(), $fake_pwd);
+ $fake_pwd = $this->getModule('misc')->getRandomString();
+ $this->switchToUser($this->User->getName(), $fake_pwd);
exit();
}
}