Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Get screenname of current user in liferay

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2.04k
    Comment on it

    Hello Guys

    ScreenName is nik name or unique identification of the user and we need to use screenname for user tagging and identify the user in liferay.

    There are two ways to get screenname of current user :

    Step 1: Get screenname of current user in jsp(view.jsp) page in liferay portlet.

     User user = themeDisplay.getUser();
    
        String screenname = user.getScreenName();
    

    Step 2: Get screenname of current user in Prtlet class(Controller) in liferay portlet.

        User user = PortalUtil.getUser(request)
    
       String screenname = user.getScreenName();
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: