Home How to get the current User object that is logged in grails?
Reply: 0

How to get the current User object that is logged in grails?

user474
1#
user474 Published in April 26, 2018, 1:46 pm

i want to get the current user who is logged in and i used this way and i jave injected the SpringsecurityService and i am getting this error like "Caused by No such property: principal for class: grails.plugin.springsecurity.SpringSecurityService Possible solutions: principal".

Organization.controller

SpringSecurityService springSecurityService

 def user = springSecurityService.get(SpringSecurityService.principal.id)
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.628125 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO