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

Only display « Migrating devices of user » for users who actually have u2f keys in migration #147

Open
tcitworld opened this issue Mar 30, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@tcitworld
Copy link
Member

Steps to reproduce

  1. Have a lot of users
  2. Execute php occ twofactor_webauthn:migrate-u2f --all

Expected behaviour

The message Migrating devices of user X should only be displayed for users with actual u2f keys registered.

Actual behaviour

The message is displayed for all users, even if they don't have any registered u2f keys to migrate

Fix

An easy fix is to make sure the following line only executes if count($registrations) > 0.

$output->writeln('Migrating devices of user ' . $user->getUID());

@tcitworld tcitworld added the bug Something isn't working label Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant