| @@ 56-67 (lines=12) @@ | ||
| 53 | * |
|
| 54 | * @return bool|UserMetaEntity |
|
| 55 | */ |
|
| 56 | public function getUserMetaById($identifier) |
|
| 57 | { |
|
| 58 | $entity = false; |
|
| 59 | $data = $this->getDataAdapter()->getData($identifier); |
|
| 60 | ||
| 61 | if (!empty($data)) { |
|
| 62 | $entity = $this->createEntity(); |
|
| 63 | $this->populateEntity($entity, $data); |
|
| 64 | } |
|
| 65 | ||
| 66 | return $entity; |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * Returns a User entity identified by (unique) Email. |
|
| @@ 72-83 (lines=12) @@ | ||
| 69 | * |
|
| 70 | * @return bool|UserEntity |
|
| 71 | */ |
|
| 72 | public function getUserById($identifier) |
|
| 73 | { |
|
| 74 | $entity = false; |
|
| 75 | $data = $this->getDataAdapter()->getData($identifier); |
|
| 76 | ||
| 77 | if (!empty($data)) { |
|
| 78 | $entity = $this->createEntity(); |
|
| 79 | $this->populateEntity($entity, $data); |
|
| 80 | } |
|
| 81 | ||
| 82 | return $entity; |
|
| 83 | } |
|
| 84 | ||
| 85 | /** |
|
| 86 | * Returns a User entity identified by (unique) Email. |
|
| @@ 92-103 (lines=12) @@ | ||
| 89 | * |
|
| 90 | * @return bool|UserEntity |
|
| 91 | */ |
|
| 92 | public function getUserByEmail($email) |
|
| 93 | { |
|
| 94 | $entity = false; |
|
| 95 | $dataList = $this->getDataAdapter()->getDataSet([$this->email => $email], 1); |
|
| 96 | ||
| 97 | if (!empty($dataList)) { |
|
| 98 | $entity = $this->createEntity(); |
|
| 99 | $this->populateEntity($entity, $dataList[0]); |
|
| 100 | } |
|
| 101 | ||
| 102 | return $entity; |
|
| 103 | } |
|
| 104 | } |
|
| 105 | ||