14 September, 2012

Get user roles in theme velocity template

Many times we have requirement coming out to fetch user roles in theme velocity template (.vm) file.
So below code you can use for Liferay 6.X :


#set($role=$serviceLocator.findService("com.liferay.portal.service.RoleLocalService"))
$role.getUserRoles($user_id)

Hope this will useful !!!
Best,
Jignesh Vachhani

Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...