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

Question: How is it different from loginUsingId #5

Closed
sarfraznawaz2005 opened this issue Feb 22, 2017 · 4 comments
Closed

Question: How is it different from loginUsingId #5

sarfraznawaz2005 opened this issue Feb 22, 2017 · 4 comments
Labels

Comments

@sarfraznawaz2005
Copy link

How is this package special because we can already login somebody else using auth()->loginUsingId() method ?

Thanks

@sarfraznawaz2005 sarfraznawaz2005 changed the title Question Question: How is it different from loginUsingId Feb 22, 2017
@MarceauKa
Copy link
Member

MarceauKa commented Feb 22, 2017

It's not an issue :)

Some points:

  • How do you know how to restore the original user? The logic quite simple but the package is here to simplify the process.
  • Controller scaffolding.
  • Blades directives.
  • Custom events.
  • Middleware.
  • Extensible

There's also some specific scenarios:

  • When you're sending custom analytics dimensions, ad tags or other marketing stuff you probably don't want to keep them when impersonating. You can use blade directives.
  • Events can be used to inject specific actions when taking and leaving the impersonation.
  • Admin model is different from User model.

But the main usage for us; we are implementing user impersonation on each of our Laravel projects (4 ~ 6 / month). We're smart and we don't want to repeat boring stuff...

@sarfraznawaz2005
Copy link
Author

sarfraznawaz2005 commented Feb 23, 2017

@MarceauKa makes lots of sense, that explanation must be on top of package intro/docs so others don't get confused too :)

@MarceauKa
Copy link
Member

MarceauKa commented Feb 23, 2017

@sarfraznawaz2005 Point! I keep the issue opened.
Ps: This package was a pair programming training with my associate :)

@preeteshjain
Copy link

preeteshjain commented Apr 6, 2018

I second @sarfraznawaz2005 's comment. The concept behind this needs to be at the top. I was looking for same information. I had to sort the issues from Old to New to get here. 😛 Please add this on the top of README.

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

No branches or pull requests

3 participants