Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On clicking "Reset login status of all team users" also reset the API… #2693

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading