Merge branch 'dev/mailing/update-1' into 'develop'
change expiry time See merge request easy-solutions/apps/easyportal!13
This commit is contained in:
commit
0d3da8dfdf
|
|
@ -1008,10 +1008,10 @@ class UserController extends AbstractController
|
|||
$uo->setIsActive(true);
|
||||
$this->entityManager->persist($uo);
|
||||
$this->entityManager->flush();
|
||||
$this->loggerService->logUserAction($user->getId(), null, "User accepted invitation for organization id : {$orgId}");
|
||||
$this->loggerService->logUserAction($user->getId(), $user->getId(), "User accepted invitation for organization id : {$orgId}");
|
||||
$this->loggerService->logOrganizationInformation($orgId, $user->getId(), "User accepted invitation with uo id : {$uo->getId()}");
|
||||
}
|
||||
return $this->render('security/login.html.twig');
|
||||
return $this->render('security/login.html.twig', ['error'=> null, 'last_username' => $user->getEmail()]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -364,10 +364,10 @@ class UserService
|
|||
|
||||
if ($uo->getStatut() === "INVITED") {
|
||||
$statut = "INVITED";
|
||||
// if user invited but not accepted in 1 hour, set statut to EXPIRED
|
||||
// if user invited but not accepted in 15 days, set statut to EXPIRED
|
||||
$now = new DateTimeImmutable();
|
||||
$invitationTime = $uo->getModifiedAt();
|
||||
$expiryTime = $invitationTime->modify('+1 hour');
|
||||
$expiryTime = $invitationTime->modify('+15 days');
|
||||
if ($now > $expiryTime) {
|
||||
$statut = "EXPIRED";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue