I'm not sure about 'social user', I'll face the issue later, but now for getting 'internal authenticated user' I have something like that in -flow.xml and in Controller class:
Code:
<on-start>
<evaluate expression="myController.initializeForm(currentUser)" result="flowScope.myForm"/>
..........
</on-start>
......
@Controller
public class MyController {
@Autowired
private YourUserService userService;
....
public FormBeanClass initializeForm(Principal principal) {
......
FormBeanClass myFormBean = new FormBeanClass()
if (principal != null && principal.getName() != null) {
UserXXClass user = userService.findByUserName(principal.getName());
// most probably user will never be == null, otherwise it won't be authenticated
...............
// do whenever you want
myFormBean.setUser(...)
myFormBean.setUserId(.......)
}
return myFormBean;
}