portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pham Tuan Minh <pham_tuan_m...@yahoo.com>
Subject How to update user infomation ?
Date Mon, 16 Jan 2006 11:52:44 GMT
When a user registers with portal, he provides some information such as phone number, email
I'd like to update these information.

There were some code lines which I wrote
import org.apache.jetspeed.security.User;
import org.apache.jetspeed.security.UserManager;
import java.util.prefs.Preferences;

public void doView(javax.portlet.RenderRequest request,
                     javax.portlet.RenderResponse response) throws javax.
      java.io.IOException {
UserManager userManager = (UserManager) getPortletContext().getAttribute(
 User user = userManager.getUser("minhpt");

Map userInfo = new HashMap();
userInfo.put("user.email", "Pham_Tuan_Minh@yahoo.com");

user.setPreferences( (Preferences) userInfo);

When I run the portlet, userManager = null.
What is the wrong ?
How to update user infomation ? Which functions must I use ? 

Please, help me. Thanks.

Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message