Secondary email confirmation sent when skip_confirmation is false

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Users can use the UI or Users API to add secondary email addresses to their account. The API endpoint allow us to set the skip_confirmation parameter. However the user would still receive a confirmation email with a link to confirm it. Once they click that it would fail and raise that it's already confirmed.

If skip_confirmation is set to true, we can either:

  • no longer send confirmation emails to the new secondary email address to avoid confusion.
  • or use different messaging to inform the user a new secondary email address was added without the need to confirm it.

At the moment it looks like we are only using this template: https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/views/devise/mailer/_confirmation_instructions_secondary.html.haml

Edited by 🤖 GitLab Bot 🤖