Skip to content

E-mail confirmation fails: NoMethodError: undefined method `username' for #<Email:0x00007f54129b1870>

https://sentry.gitlap.com/gitlab/gitlabcom/issues/87395/

NoMethodError: undefined method `username' for #<Email:0x00007f54129b1870>
Did you mean?  user=
  app/controllers/confirmations_controller.rb:20:in `after_confirmation_path_for'
    Gitlab::AppLogger.info("Email Confirmed: username=#{resource.username} email=#{resource.email} ip=#{request.remote_ip}")
  lib/gitlab/i18n.rb:47:in `with_locale'
    yield
  lib/gitlab/i18n.rb:53:in `with_user_locale'
    with_locale(user&.preferred_language, &block)
  app/controllers/application_controller.rb:349:in `set_locale'
    Gitlab::I18n.with_user_locale(current_user, &block)
  lib/gitlab/middleware/multipart.rb:93:in `call'
    return @app.call(env) if encoded_message.blank?
...
(124 additional frame(s) were not displayed)

NoMethodError: undefined method `username' for #<Email:0x00007f54129b1870>
Did you mean?  user=