Skip to content

Artisan command for "refetching" user avatars for existing users #3232

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

Closed
wants to merge 1 commit into from

Conversation

shelmz
Copy link

@shelmz shelmz commented Feb 3, 2022

Added an artisan command to search for new (gr)avatar for given user but deletes previous avatar, even if no new one is found.
Solves #1893.

search for new (gr)avatar for given user but deletes previous avatar, even if no new one is found
@ssddanbrown
Copy link
Member

Hi @shelmz, Thanks for offering this. Looks functionally good.

A few notes from my side:

  • I think the command should be named using "Refetch" instead of "Reset" since people may instead expect it to be reset to the default empty state. Fetching enforces the idea we'd be "fetching" the image from elsewhere.
  • The $signature needs to be updated since it still refers to reset MFA.
  • The User is being injected in via the constructor but not used, can be removed (Including the comment on line 27).
  • Ideally we'd add a test to cover the functionality (example). Just say if not comfortable though and I can add this afterwards.
  • I think we should have an optional --users-without-avatars flag which will run this for all users without avatars assigned. This would considerably help the scenario given in Artisan command for "refetching" user avatars for existing users. #1893 where they presumably have many existing users without avatars, rather than them needing to run this command for each id/email desired.

@ssddanbrown
Copy link
Member

Since there's been no follow-up I'm going to close this but would be happy to re-open or accept a new PR if the above notes can be taken into account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants