title: Grails & spring security getting the id of the current logged in user
body: <p>This is a sample code for the getCurrentUser() method in Spring Security service.</p>
  
  <pre><code>class SomeController {
      def springSecurityService
  
      def someAction() {
      def user = springSecurityService.currentUser
     }
  }
  </code></pre>
  
  <p>How do you get the id of the logged in user and use it in this <code>&lt;g:link action="show" controller="User" id=""&gt;Show Profile&lt;/g:link&gt;</code> </p>