Skip to content

Commit

Permalink
Merge pull request #2435 from MushroomObserver/njw-welcome-user-tweak
Browse files Browse the repository at this point in the history
Account signups needing verification redirect to home (or back)
  • Loading branch information
nimmolo authored Sep 29, 2024
2 parents 0974534 + eb1bf8e commit 74692e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions app/controllers/account_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,10 @@ def create
UserStats.create({ user_id: @new_user.id })
end

@user = @new_user
redirect_back_or_default(account_welcome_path)
redirect_back_or_default("/")
end

# This is the welcome page for new users who just created an account.
# This is the welcome page for new users who just verified an account.
def welcome; end

private #################################################
Expand Down
2 changes: 1 addition & 1 deletion test/integration/capybara/account_integration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def test_signup_verify_login_and_logout
end

# Redirected to the Welcome page, but email not verified.
assert_selector("body.account__welcome")
assert_selector("body.observations__index")

# At this point there should be an unverified account for Dumbledore.
wizard = User.find_by(email: "[email protected]")
Expand Down

0 comments on commit 74692e1

Please sign in to comment.