Share is different from the repository with regards to root objects.
You have a variable user
(of java type org.springframework.extensions.webscripts.ScriptUser
) which has a method getName()
.
To get the username in a freemarker template (in Share), you can use ${user.name}
or ${user.getName()}