summaryrefslogtreecommitdiff
path: root/app/frontend/controls/HeaderMenu.php
blob: 248862930b6a0ba52b76cd50a39b43e5683f84b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)
        );
    }

}

?>