Here is the Velocity template:
#set ($userLS = $portal.getClass().forName('com.liferay.portal.service.UserLocalServiceUtil'))If you want to display username with welcome message:
#set ($userId = $getterUtil.getLong($request.get("theme-display").get("user-id")))
#set ($user = $userLS.getUserById($userId))
<div class="user-welcome">
<span class="username">$user.getFullName() </span>
</div>
#set ($userLS = $portal.getClass().forName('com.liferay.portal.service.UserLocalServiceUtil')) #set ($userId = $getterUtil.getLong($request.get("theme-display").get("user-id"))) #set ($user = $userLS.getUserById($userId)) <div class="user-welcome"> #if($user.isMale()) <span class="welcome-msg">Bienvenido</span><br> #else <span class="welcome-msg">Bienvenida</span><br> #end <span class="username">$user.getFullName() $user.getLastName()</span> </div>
No comments:
Post a Comment