*** /home/cbamford/Desktop/14.patch	2020-01-10 09:50:49.174136181 -0800
--- /home/cbamford/Desktop/masquerade-log-context-2357187-15.patch	2020-01-10 09:47:25.706401911 -0800
***************
*** 304,310 ****
  +
  +}
  diff --git a/src/Masquerade.php b/src/Masquerade.php
! index d5eac37..3e6219d 100644
  --- a/src/Masquerade.php
  +++ b/src/Masquerade.php
  @@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
--- 304,310 ----
  +
  +}
  diff --git a/src/Masquerade.php b/src/Masquerade.php
! index 2b3efc5..50c68ad 100644
  --- a/src/Masquerade.php
  +++ b/src/Masquerade.php
  @@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Session\SessionInterface;
***************
*** 373,388 ****
     /**
      * Masquerades the current user as a given user.
      *
! @@ -171,7 +146,7 @@ class Masquerade {
         return FALSE;
       }
       // Load previous user account.
  -    $user = $this->userStorage->load($this->session->get('masquerading'));
  +    $user = $this->userStorage->load($this->getMasqueradingUserId());
!  
!      // Ensure the flag is cleared.
!      $this->session->remove('masquerading');
! @@ -190,21 +165,4 @@ class Masquerade {
       return TRUE;
     }
   
--- 373,388 ----
     /**
      * Masquerades the current user as a given user.
      *
! @@ -174,7 +149,7 @@ class Masquerade {
         return FALSE;
       }
       // Load previous user account.
  -    $user = $this->userStorage->load($this->session->get('masquerading'));
  +    $user = $this->userStorage->load($this->getMasqueradingUserId());
!      if (!$user) {
!        // Ensure the flag is cleared.
!        $this->session->remove('masquerading');
! @@ -196,21 +171,4 @@ class Masquerade {
       return TRUE;
     }
   
