@@ -8,33 +8,33 @@ |
||
8 | 8 | |
9 | 9 | class AccessRightRepository extends EntityRepository |
10 | 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 |
|
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 | 19 | id_access_right = :id_access_right |
20 | 20 | "); |
21 | - $query->bindValue("id_access_right", $access_right->getId()); |
|
22 | - $query->execute(); |
|
23 | - } |
|
21 | + $query->bindValue("id_access_right", $access_right->getId()); |
|
22 | + $query->execute(); |
|
23 | + } |
|
24 | 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) |
|
32 | - { |
|
33 | - $query = $this->getEntityManager()->getConnection()->prepare("UPDATE user SET id_access_right = :id_access_right WHERE |
|
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) |
|
32 | + { |
|
33 | + $query = $this->getEntityManager()->getConnection()->prepare("UPDATE user SET id_access_right = :id_access_right WHERE |
|
34 | 34 | guid = :guid_user |
35 | 35 | "); |
36 | - $query->bindValue("id_access_right", $access_right_id, \PDO::PARAM_INT); |
|
37 | - $query->bindValue("guid_user", $guid_admin, \PDO::PARAM_STR); |
|
38 | - $query->execute(); |
|
39 | - } |
|
36 | + $query->bindValue("id_access_right", $access_right_id, \PDO::PARAM_INT); |
|
37 | + $query->bindValue("guid_user", $guid_admin, \PDO::PARAM_STR); |
|
38 | + $query->execute(); |
|
39 | + } |
|
40 | 40 | } |