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
Hi,
When a user registers with portal, he provides some information such as phone number, email
address,...
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.
      portlet.PortletException,
      java.io.IOException {
//.......
UserManager userManager = (UserManager) getPortletContext().getAttribute(
        CommonPortletServices.CPS_USER_MANAGER_COMPONENT);
 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.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message