Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

original_user is nill #94

Open
hendranata opened this issue Jul 14, 2016 · 4 comments
Open

original_user is nill #94

hendranata opened this issue Jul 14, 2016 · 4 comments

Comments

@hendranata
Copy link

helo

when i want to switch back to original user.
it returns a nill value

so how do we solve this?

@rajahafify
Copy link

rajahafify commented Sep 26, 2016

I found out that if u set the /switch_user/remember_user?remember=true in devise after_sign_in_path like so

#app/helper/devise_helper.rb

module RedirectionHelper
  def after_sign_in_path_for(resource)
    `/switch_user/remember_user?remember=true`
  end
end

Then you will be fine again. The original user wont be nil.
This only works if you use Devise.

@rathboma
Copy link

That didn't work for me. Original user is always nil. Any ideas?

I saw there's meant to be a session value for the original user, this is also always not present for me.

:original_user_scope_identifier

@23ranjan
Copy link

+1

@23ranjan
Copy link

Worked for me after upgrading the gem to 1.5.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants