File: CoreLogonIcingaweb2.php

package info (click to toggle)
icingaweb2-module-nagvis 1.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 908 kB
  • sloc: php: 1,176; sh: 54; javascript: 42; makefile: 15
file content (22 lines) | stat: -rw-r--r-- 517 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php

class CoreLogonIcingaweb2 extends CoreLogonModule
{
    public function check($printErr = true)
    {
        global $AUTH, $CORE;
        if ($AUTH->isAuthenticated()) {
            $AUTH->setTrustUsername(true);
            $AUTH->setLogoutPossible(false);
            return true;
        } else {
            // ??? ...
            die('not authenticated');
            // ...
            header('Location: /icingaweb');
            exit;
            // ... ???
            return false;
        }
    }
}