From: Tom Hughes Date: Mon, 25 Jul 2022 23:32:16 +0000 (+0100) Subject: Don't try and write directly to the user status X-Git-Tag: live~2082 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/2cbf6062fc1d9a1f169c36f98d5ff383575cef0a?ds=inline;hp=-c Don't try and write directly to the user status This causes an exception when processing the authentication callback for providers like google where we treat the email address as verified. --- 2cbf6062fc1d9a1f169c36f98d5ff383575cef0a diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 534f98810..6215403c9 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -271,7 +271,7 @@ class UsersController < ApplicationController session[:new_user].auth_provider = provider session[:new_user].auth_uid = uid - session[:new_user].status = "active" if email_verified && email == session[:new_user].email + session[:new_user].activate if email_verified && email == session[:new_user].email redirect_to :action => "terms" else