| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function index() |
||
| 10 | { |
||
| 11 | //testing auth |
||
| 12 | if ($this->auth->isAdmin()) { |
||
| 13 | $this->data['userRole'] = 'Admin'; |
||
| 14 | $this->data['userLevel'] = $this->auth->getUserLevel(); |
||
| 15 | } elseif ($this->auth->isUser()) { |
||
| 16 | $this->data['userRole'] = 'User'; |
||
| 17 | $this->data['userLevel'] = $this->auth->getUserLevel(); |
||
| 18 | }else { |
||
| 19 | $this->alertBox->setAlert("You must be connected to acces the admin interface", 'warning'); |
||
| 20 | $this->container->getResponse()->redirect(); |
||
| 21 | } |
||
| 22 | |||
| 23 | $this->renderView('Admin/Home'); |
||
| 24 | |||
| 26 | } |