bug correction
This commit is contained in:
parent
a219f0f067
commit
e6068fd538
|
|
@ -27,13 +27,13 @@ class UserChecker implements UserCheckerInterface
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if the user account is active
|
// check if the user account is active
|
||||||
if (method_exists($user, 'isActive') && $user->isActive()) {
|
if (method_exists($user, 'isActive') && !$user->isActive()) {
|
||||||
throw new CustomUserMessageAccountStatusException('Votre compte est désactivé.');
|
throw new CustomUserMessageAccountStatusException('Votre compte est désactivé.');
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if the user is in an organization
|
//check if the user is in an organization
|
||||||
$uo = $this->entityManager->getRepository(UsersOrganizations::class)->findOneBy(['users' => $user, 'isDeleted' => true]);
|
$uo = $this->entityManager->getRepository(UsersOrganizations::class)->findOneBy(['users' => $user, 'isActive' => true]);
|
||||||
if ($uo === null) {
|
if (!$uo) {
|
||||||
throw new CustomUserMessageAccountStatusException('Vous n\'êtes pas relié à une organisation. veuillez contacter un administrateur.');
|
throw new CustomUserMessageAccountStatusException('Vous n\'êtes pas relié à une organisation. veuillez contacter un administrateur.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue