| @@ 154-166 (lines=13) @@ | ||
| 151 | } |
|
| 152 | ||
| 153 | ||
| 154 | private function retrieveIdenityByCookie($userId, $series, $status = Entity\Identity::STATUS_ANY) |
|
| 155 | { |
|
| 156 | $cookie = new Entity\CookieIdentity; |
|
| 157 | $mapper = $this->mapperFactory->create(Mapper\CookieIdentity::class); |
|
| 158 | ||
| 159 | $cookie->setUserId($userId); |
|
| 160 | $cookie->setSeries($series); |
|
| 161 | $cookie->setStatus($status); |
|
| 162 | ||
| 163 | $mapper->fetch($cookie); |
|
| 164 | ||
| 165 | return $cookie; |
|
| 166 | } |
|
| 167 | ||
| 168 | ||
| 169 | public function logout(Entity\CookieIdentity $identity, $key) |
|
| @@ 57-68 (lines=12) @@ | ||
| 54 | ||
| 55 | ||
| 56 | ||
| 57 | public function findCookieIdenity($userId, $series) |
|
| 58 | { |
|
| 59 | $cookie = new Entity\CookieIdentity; |
|
| 60 | $cookie->setStatus(Entity\Identity::STATUS_ACTIVE); |
|
| 61 | $cookie->setUserId($userId); |
|
| 62 | $cookie->setSeries($series); |
|
| 63 | ||
| 64 | $mapper = $this->mapperFactory->create(Mapper\CookieIdentity::class); |
|
| 65 | $mapper->fetch($cookie); |
|
| 66 | ||
| 67 | return $cookie; |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||