Attempt to assign anonymous screenshots to logged-in user
This commit is contained in:
parent
228b7375e7
commit
0dd63f6bf6
7 changed files with 65 additions and 25 deletions
|
|
@ -33,6 +33,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||
# You need to implement the method below in your model (e.g. app/models/user.rb)
|
||||
@user = User.from_omniauth(request.env["omniauth.auth"])
|
||||
|
||||
# Has the user uploaded screenshots while not being logged in?
|
||||
# Move the screenshots to the real account and tell the user.
|
||||
if @user.persisted?
|
||||
flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => provider_name
|
||||
sign_in_and_redirect @user, :event => :authentication
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue