| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function onBeforeSecurityLogin() |
||
| 18 | { |
||
| 19 | $backUrl = $this->owner->getRequest()->getVar('BackURL'); |
||
| 20 | if (strstr($backUrl, '/admin/')) { |
||
| 21 | if (Controller::curr()->class != 'AdminSecurity') { |
||
| 22 | $link = 'AdminSecurity/login'.'?BackURL='.urlencode($backUrl); |
||
| 23 | |||
| 24 | return $this->owner->redirect($link); |
||
| 25 | } |
||
| 26 | } |
||
| 27 | } |
||
| 28 | } |
||
| 29 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.