Commit 0cf550d2 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Pise en compte de authNormalize lors de la récupération du mode de déclaration

parent 919a6133
Loading
Loading
Loading
Loading
+3 −1
Changes for module/Oscar/src/Oscar/Service/PersonService.php: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -841,7 +841,9 @@ class PersonService implements UseOscarConfigurationService, UseEntityManager, U
        /** @var AuthentificationRepository $repo */
        $repo = $this->getEntityManager()->getRepository(Authentification::class);

        return $repo->getAuthentificationPerson($person);
        return $repo->getAuthentificationPerson(
            $person,
            $this->getOscarConfigurationService()->getAuthPersonNormalize());
    }

    /**
+1 −3
Changes for module/Oscar/src/Oscar/Service/TimesheetService.php: 1 added line, 3 removed lines.
Original line number Diff line number Diff line
@@ -1381,9 +1381,7 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat
                }

                /** @var Authentification $auth */
                $auth = $this->getEntityManager()->getRepository(Authentification::class)->findOneBy(
                    ['username' => $person->getLadapLogin()]
                );
                $auth = $this->getPersonService()->getPersonAuthentification($person);
                if (!$auth) {
                    throw new \Exception("La personne '$person' n'a pas de compte actif sur Oscar.");
                }