| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.0416 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 55 | 6 | public function getIdentity() |
|
| 56 | { |
||
| 57 | 6 | if (!$this->identity) { |
|
| 58 | // check user agent |
||
| 59 | 3 | if (Session::get('auth:agent') == Request::getServer('HTTP_USER_AGENT')) { |
|
| 60 | $this->identity = Session::get('auth:identity'); |
||
| 61 | } else { |
||
| 62 | 3 | $this->clearIdentity(); |
|
| 63 | } |
||
| 64 | } |
||
| 65 | 6 | return $this->identity; |
|
| 66 | } |
||
| 67 | |||
| 80 |