src/classes/Controller/EventController.php 1 location
|
@@ 78-84 (lines=7) @@
|
| 75 |
|
} |
| 76 |
|
$returnPath = 'user-roles'; |
| 77 |
|
$newIdFound = false; |
| 78 |
|
while (!$newIdFound) { |
| 79 |
|
$id = Crypt::generateInt(0, 2147483648); // largest int in db column |
| 80 |
|
if (is_null(EventQuery::create()->findPK($id))) { |
| 81 |
|
$newIdFound = true; |
| 82 |
|
$e->setId($id); |
| 83 |
|
} |
| 84 |
|
} |
| 85 |
|
$e->setCreatedBy($this->auth->currentUser()); |
| 86 |
|
} |
| 87 |
|
$e->setName($data['name']); |
src/classes/Controller/UserController.php 1 location
|
@@ 54-60 (lines=7) @@
|
| 51 |
|
// create new user |
| 52 |
|
$returnPath = 'user-roles'; |
| 53 |
|
$newIdFound = false; |
| 54 |
|
while (!$newIdFound) { |
| 55 |
|
$id = Crypt::generateInt(0, 2147483648); // largest int in db column |
| 56 |
|
if (is_null(UserQuery::create()->findPK($id))) { |
| 57 |
|
$newIdFound = true; |
| 58 |
|
$u->setId($id); |
| 59 |
|
} |
| 60 |
|
} |
| 61 |
|
} |
| 62 |
|
|
| 63 |
|
$u->setFirstName($data['firstname']); |