src/api/user.php 1 location
|
@@ 198-202 (lines=5) @@
|
| 195 |
|
'authtype' => $this->authtype |
| 196 |
|
); |
| 197 |
|
|
| 198 |
|
if ($this->id) { |
| 199 |
|
$parameters['id'] = $this->id; |
| 200 |
|
$conditions->add($qb->expr()->neq('c.id', ':id')); |
| 201 |
|
} |
| 202 |
|
$conditions->add($qb->expr()->eq('c.login', ':login')); |
| 203 |
|
$conditions->add($qb->expr()->eq('c.authtype', ':authtype')); |
| 204 |
|
|
| 205 |
|
$qb->where($conditions) |
src/api/object.php 1 location
|
@@ 261-268 (lines=8) @@
|
| 258 |
|
$qb = connection::get_em()->createQueryBuilder(); |
| 259 |
|
$qb->from(get_class($this), 'c'); |
| 260 |
|
$conditions = $qb->expr()->andX(); |
| 261 |
|
if ($this->id) { |
| 262 |
|
$parameters = array( |
| 263 |
|
'id' => $this->id |
| 264 |
|
); |
| 265 |
|
$conditions->add($qb->expr()->neq('c.id', ':id')); |
| 266 |
|
} |
| 267 |
|
$found = false; |
| 268 |
|
foreach ($this->cm->midgard['unique_fields'] as $field) { |
| 269 |
|
if (empty($this->$field)) { |
| 270 |
|
//empty names automatically pass according to Midgard logic |
| 271 |
|
continue; |