On 31 May 2012, at 21:55, Ferhat Beyaz wrote:
> Hi,
>
> I am using the Authentication Plugin here:
>
http://grails.org/plugin/authentication>
> Is it possible to get the user ID of the currently logged in user? How
> can I achieve that?
>
If you view the source code for authenticationService on github, you will see there is this method:
getSessionUser()
So if you inject authenticationService into your code and get the sessionUser property, you will get the AuthenticationUser object, from that you can get the "login" property.
Regards
Marc
~ ~ ~
Marc Palmer
Freelancer (Grails/Groovy/Java/UX)
I offer commercial support for Grails plugins from as low as $50/mo.
For details see:
http://grailsrocks.comBlog:
http://www.anyware.co.uk | Resumé:
http://www.anyware.co.uk/marcContributor @
http://grails.org | Founder @
http://noticelocal.comDeveloper @
http://weceem.org | Member @
http://spottymushroom.comTwitter:
http://twitter.com/wangjammer5
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email