Skip to content

Commit

Permalink
On clicking "Reset login status of all team users" also reset the API…
Browse files Browse the repository at this point in the history
… login status.
  • Loading branch information
meisterT committed Sep 21, 2024
1 parent e1c592a commit 95e6373
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions webapp/src/Controller/Jury/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,11 @@ public function resetTeamLoginStatus(Request $request): Response
$count = 0;
foreach ($teamRole->getUsers() as $user) {
/** @var User $user */
$user->setFirstLogin(null);
$user->setLastLogin(null);
$user->setLastIpAddress(null);
$user
->setFirstLogin(null)
->setLastLogin(null)
->setLastApiLogin(null)
->setLastIpAddress(null);
$count++;
}
$this->em->flush();
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public function getLastLoginAsDateTime(): ?DateTime
return $this->getLastLogin() ? new DateTime(Utils::absTime($this->getLastLogin())) : null;
}

public function setLastApiLogin(string|float $lastApiLogin): User
public function setLastApiLogin(string|float|null $lastApiLogin): User
{
$this->last_api_login = $lastApiLogin;
return $this;
Expand Down

0 comments on commit 95e6373

Please sign in to comment.