diff --git a/src/front/Components/Layouts/Users/UserInformations/index.tsx b/src/front/Components/Layouts/Users/UserInformations/index.tsx
index 9f393bd0..c31d7404 100644
--- a/src/front/Components/Layouts/Users/UserInformations/index.tsx
+++ b/src/front/Components/Layouts/Users/UserInformations/index.tsx
@@ -69,9 +69,9 @@ export default function UserInformations(props: IProps) {
});
if (!user) return;
const roles = await Roles.getInstance().get({
- where: {NOT: {OR:[{name: "super-admin"}, {name: "admin"}]}},
+ where: { NOT: { OR: [{ name: "super-admin" }, { name: "admin" }] } },
});
- if (!roles) return
+ if (!roles) return;
setAvailableRoles(roles.map((role) => ({ value: role.uid, label: role.label })));
setUserSelected(user);
}, [userUid]);
@@ -140,8 +140,9 @@ export default function UserInformations(props: IProps) {
}),
);
}
+ getUser();
setIsAdminModalOpened(false);
- }, [userSelected, adminModalType]);
+ }, [userSelected, adminModalType, getUser]);
/** Functions for the super admin modal */
const openSuperAdminModal = () => {
@@ -286,7 +287,7 @@ export default function UserInformations(props: IProps) {