First Previous Next Last

User Management Guide  

Chapter 5   Managing User Profiles

This chapter describes how to manage user profiles, which contain user-specific information such as attributes and preferences that is stored in the application database, rather than the realm. This chapter has these sections:

For more information    For an overview of user profiles, see About profiles.

 
Top of page

About user profiles

User profiles are stored in the application database and thus persist across application deployments. The database in which user profiles are stored is completely independent from the authentication realm. In other words, although user profiles typically correspond to authenticated application users, this is not a requirement. The actual purpose and use of profiles depends on the design of your application.

The Custom Web app provided with the Portal subsystem is designed to work with a writable realm. The New User component allows anonymous users to add themselves to the realm. It automatically creates a profile for each user added to the writable realm. You can change the New User component or design a new one.

For example, consider an application that uses only a readable realm. That application could maintain profiles only for authenticated users who actually log in, or it could maintain a profile for every user in the realm regardless of their use of the application.

It is also possible to create profiles that do not correspond to authenticated users. For example, the default profile database contains one such profile. It provides a "sample" profile for educational purposes that has no corresponding user except by coincidence.

 
Top of page

About managing user profiles

Director provides built-in facilities for managing user profiles:

If your application has different requirements, it can manage user profiles using the User subsystem API as described in Using the User API.

 
Top of page

Using the New User component

The New User component is one of the core components used in the custom Web App. You can use it as a template in your own application.

NewUserComponent

The New User component does the following:

The source file for the New User component is in your Director project directory:

  Portal\WEB-INF\lib\portal-core-resource\src\com\sssw\portal\
      component\core\NewUserComponent.java

 
Top of page

Using the User API

 
Top of section

Creating a new profile

This code shows how the New User component adds a user profile.

  //
  // Get a profile delegate from the user service
  //
  EbiUserDelegate userDelegate =  
      com.sssw.fw.usermgr.client.EboFactory.getUserDelegate();
  //
  // Instantiate an empty profile object for this user
  //
  EbiUserInfo userInfo = (EbiUserInfo)userDelegate.createUserInfo();
  //
  // Add profile info (default attributes) for the user
  //
  userInfo.setUserID(m_uid);
  userInfo.setUserFirstName(m_firstName);
  userInfo.setUserLastName(m_lastName);
  userInfo.setUserEmailAddress(m_email);
  userInfo.setUserAuthenticatedRealmName(dirService.getPrimaryRealmName());
  //
  // Add the new profile
  //
  boolean status = userDelegate.createUser(context, userInfo);	 
    First Previous Next Last

User Management Guide  

Copyright © 2002, SilverStream Software, LLC, a wholly owned subsidiary of Novell, Inc. All rights reserved.