예제 #1
0
 /**
  * Check if the hash is valid to get the user linked to the hash
  *
  * @param Request $request
  * @return Bool
  */
 protected function setSessionUser(Request $request)
 {
     $hash = $request->header('X-SESSION-ID');
     $session = Session::whereHash($hash)->first();
     if (!$session) {
         return false;
     }
     $this->hash = $hash;
     $this->user = $session->user;
     return true;
 }