summaryrefslogtreecommitdiff
path: root/app/php/controls/HeaderMenu.php
blob: 1e74be334501f146e78ed7ec32607a87cb73bcad (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
<?php

Prado::using('Application.web.TemplateControl');

Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton');

class HeaderMenu extends TemplateControl {

    public function loginUser($sender, $param) {
        $this->Application->getModule('auth')->setReturnUrl($this->Request->RequestUri);
        $this->Response->redirect(
            $this->Service->ConstructUrl('Login')
        );
    }

    public function logoutUser($sender, $param) {
        $this->Application->getModule('auth')->logout();
        $this->Response->redirect(
            $this->Service->ConstructUrl(NULL)
        );
    }

}

?>