<< Back - Alkacon logo

OpenCms 6.0 interactive documentation:

Documentation for the user() method

OpenCms logo - Forward >>

The user() method

This method provides access to read the properties of the current user as specified in the "User - Management" backoffice module.

Parameters:

Name Description
java.lang.String property Specifies which value to read of the current user. The following values are supported:
  • "name": the user's login name
  • "firstname": the user's first name
  • "lastname": the user's last name
  • "email": the user's email address
  • "street": the user's street address
  • "zip": the user's zip code
  • "city": the user's city
  • "description": a clear text string with a description of the user
  • "group" or  "currentgroup": the name of the current group of the user.
  • "defaultgroup": the name of the default group of the user.
  • "otherstuff": custom key/value coded additional information

Example usage:

Get the first and the last name of the current user:

<%
org.opencms.jsp.CmsJspActionElement cms = new org.opencms.jsp.CmsJspActionElement(pageContext, request, response);

out.println(cms.user("firstname"));
out.println(cms.user("lastname"));
%>

©2005 Alkacon Software GmbH (http://www.alkacon.com) - The OpenCms experts