| Total Complexity | 2 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 9 | class AccessRightRepository extends EntityRepository |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * function that delete all user which are in a list of rights |
||
| 13 | * @param AccessRight $access_right |
||
| 14 | * @throws DBALException |
||
| 15 | */ |
||
| 16 | public function deleteAllUsersList(AccessRight $access_right) |
||
| 17 | { |
||
| 18 | $query = $this->getEntityManager()->getConnection()->prepare("UPDATE user SET id_access_right = NULL WHERE |
||
| 19 | id_access_right = :id_access_right |
||
| 20 | "); |
||
| 21 | $query->bindValue("id_access_right", $access_right->getId()); |
||
| 22 | $query->execute(); |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * function that add a user in an access right list |
||
| 27 | * @param int $access_right_id |
||
| 28 | * @param string $guid_admin |
||
| 29 | * @throws DBALException |
||
| 30 | */ |
||
| 31 | public function setAccessRightListUser(int $access_right_id, string $guid_admin) |
||
| 39 | } |
||
| 40 | } |
||
| 41 |