| Conditions | 3 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | function login() { |
||
| 16 | if (!empty($_GET['next'])) { |
||
| 17 | $next_url = base_url() . $_GET['next']; |
||
| 18 | $this->session_lib->flash_set("auth_next_page", $next_url); |
||
| 19 | } |
||
| 20 | |||
| 21 | $this->auth_lib->force_authentication(); |
||
| 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); |
||
| 28 | } |
||
| 34 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.