]> git.openstreetmap.org Git - rails.git/commitdiff
Don't try and write directly to the user status
authorTom Hughes <tom@compton.nu>
Mon, 25 Jul 2022 23:32:16 +0000 (00:32 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 25 Jul 2022 23:52:22 +0000 (00:52 +0100)
This causes an exception when processing the authentication callback for
providers like google where we treat the email address as verified.

app/controllers/users_controller.rb

index 534f988104c85beb24a20a1b11a5eef466191b93..6215403c9795895d4059e5e483412065084afb16 100644 (file)
@@ -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