ollieread / multiauth

Laravel multi auth
441 stars 109 forks source link

Impersonate Problem? #71

Closed nodefortytwo closed 9 years ago

nodefortytwo commented 9 years ago

Not sure if i'm reading this right but the impersonate method only runs if $this->check() is true.

So it will only let you impersonate a user that is already currently logged in? is that the desired behaviour?

public function impersonate($type, $id, $remember = false) {
    if($this->check()) {
        return Auth::$type()->loginUsingId($id, $remember);
    }
}
ollieread commented 9 years ago

It's a security feature really, why would you want a user impersonating another one if they aren't logged in?