Issues (150)

src/app/controllers/oidc.php (9 issues)

1
<?php
2
3
class oidc extends Controller {
4
5
    function __construct() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
6
        $this->load_library("auth_lib");
7
        $this->load_library("http_lib", "http");
8
        $this->load_library("session_lib");
9
    }
10
11
    function index() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
12
        $this->http->redirect(locale_base_url() . "oidc/login/");
0 ignored issues
show
Bug Best Practice introduced by
The property http does not exist on oidc. Did you maybe forget to declare it?
Loading history...
13
    }
14
15
    function login() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
16
        if (!empty($_GET['next'])) {
17
            $next_url = base_url() . $_GET['next'];
18
            $this->session_lib->flash_set("auth_next_page", $next_url);
0 ignored issues
show
Bug Best Practice introduced by
The property session_lib does not exist on oidc. Did you maybe forget to declare it?
Loading history...
19
        }
20
21
        $this->auth_lib->force_authentication();
0 ignored issues
show
Bug Best Practice introduced by
The property auth_lib does not exist on oidc. Did you maybe forget to declare it?
Loading history...
22
23
        $next_page = $this->session_lib->flash_get("auth_next_page");
24
        if (empty($next_page)) {
25
            $next_page = locale_base_url();
26
        }
27
        $this->http->redirect($next_page);
0 ignored issues
show
Bug Best Practice introduced by
The property http does not exist on oidc. Did you maybe forget to declare it?
Loading history...
28
    }
29
30
    function logout() {
0 ignored issues
show
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
31
        $this->auth_lib->logout();
0 ignored issues
show
Bug Best Practice introduced by
The property auth_lib does not exist on oidc. Did you maybe forget to declare it?
Loading history...
32
    }
33
}
34