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", "[EMAIL PROTECTED]");
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.