diff --git a/src/Ollieread/Multiauth/Guard.php b/src/Ollieread/Multiauth/Guard.php index 9932542..a31edbc 100644 --- a/src/Ollieread/Multiauth/Guard.php +++ b/src/Ollieread/Multiauth/Guard.php @@ -22,4 +22,14 @@ public function getRecallerName() { return 'remember_' . $this->name . '_' . md5(get_class($this)); } + public function get() { + return $this->user(); + } + + public function impersonate($type, $id, $remember = false) { + if($this->check()) { + return Auth::$type()->loginUsingId($id, $remember); + } + } + }