Getting the users from the Theme



set ($isAdmin = false)

    #if ($is_signed_in)

     #set ($rService = $serviceLocator.findService("com.liferay.portal.service.RoleService"))

    #set ($usrRoles = $rService.getUserRoles( $user_id ))

     #foreach( $usrRole in $usrRoles )
            #if ( $usrRole.getName() == "Administrator" )
            #set ($isAdmin = true)
            #end
#end

Comments

Popular posts from this blog

Theme display in javascript

How to know which liferay version we are using

Viewing the SQL Query in liferay : debugging the SQL Query in Hibernate