title: Accessing the Symfony user session in the model (Doctrine)
body: <p>How should one access Symfony's current user session in Doctrine's model? </p>
  
  <p>The two ways (that I know of) to do it are to either pull it from the sfContext inside the model: </p>
  
  <pre><code>sfContext::getInstance()-&gt;getUser()-&gt;getCanSwim();
  </code></pre>
  
  <p>Or, pass the sfUser instance (or piece) directly to the model from the controller:</p>
  
  <pre><code>UserTable::goSwimming($sf_user-&gt;can_swim);
  </code></pre>
  
  <p>But, are any of these methods better than the other, or is this not the correct way to do it all?</p>