summaryrefslogtreecommitdiff
path: root/app/frontend/controls/HeaderMenu.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/frontend/controls/HeaderMenu.php')
-rw-r--r--app/frontend/controls/HeaderMenu.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/frontend/controls/HeaderMenu.php b/app/frontend/controls/HeaderMenu.php
new file mode 100644
index 0000000..2488629
--- /dev/null
+++ b/app/frontend/controls/HeaderMenu.php
@@ -0,0 +1,26 @@
+<?php
+
+Prado::using('Application.web.TemplateControl');
+
+Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');
+
+class HeaderMenu extends TemplateControl {
+
+ public function loginUser($sender, $param) {
+ $authModule = $this->Application->getModule('auth');
+ $authModule->setReturnUrl($this->Request->RequestUri);
+ $this->Response->redirect(
+ $this->Service->ConstructUrl($authModule->LoginPage)
+ );
+ }
+
+ public function logoutUser($sender, $param) {
+ $this->Application->getModule('auth')->logout();
+ $this->Response->redirect(
+ $this->Service->ConstructUrl(NULL)
+ );
+ }
+
+}
+
+?>