original_string: private function loadPrincipalFromRememberMeCookie()
      {
          $hash = cookie('remember_me');
          if ($hash === null) {
              return;
          }
  
          try {
              list($id, $token) = explode('|', base64_decode($hash));
          }
          catch (Exception $e) {
              $this->deleteRememberMeCookie();
              return;
          }
  
          /** @var Model $user */
          $model = config('auth.model.class');
          $user  = call_user_func([$model, 'find'], $id);
          //$user = User::find($id);
          if ($user !== null && !empty($token) && $token === $user->getAttribute('remember_token')) {
              $this->setPrincipal($user->getId(), $user->getAttribute('name'), $user->getAttribute('role'));
          }
      }
code: private function loadPrincipalFromRememberMeCookie()
      {
          $hash = cookie('remember_me');
          if ($hash === null) {
              return;
          }
  
          try {
              list($id, $token) = explode('|', base64_decode($hash));
          }
          catch (Exception $e) {
              $this->deleteRememberMeCookie();
              return;
          }
  
          /** @var Model $user */
          $model = config('auth.model.class');
          $user  = call_user_func([$model, 'find'], $id);
          //$user = User::find($id);
          if ($user !== null && !empty($token) && $token === $user->getAttribute('remember_token')) {
              $this->setPrincipal($user->getId(), $user->getAttribute('name'), $user->getAttribute('role'));
          }
      }
code_tokens: private function loadPrincipalFromRememberMeCookie ( ) { $ hash = cookie ( 'remember_me' ) ; if ( $ hash === null ) { return ; } try { list ( $ id , $ token ) = explode ( '|' , base64_decode ( $ hash ) ) ; } catch ( Exception $ e ) { $ this -> deleteRememberMeCookie ( ) ; return ; } /** @var Model $user */ $ model = config ( 'auth.model.class' ) ; $ user = call_user_func ( [ $ model , 'find' ] , $ id ) ; //$user = User::find($id); if ( $ user !== null && ! empty ( $ token ) && $ token === $ user -> getAttribute ( 'remember_token' ) ) { $ this -> setPrincipal ( $ user -> getId ( ) , $ user -> getAttribute ( 'name' ) , $ user -> getAttribute ( 'role' ) ) ; } }
docstring: Read the "remember me" cookie if exist and store the principal into the session.
docstring_tokens: Read the remember me cookie if exist and store the principal into the session .