<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="com.jivesoftware.forum.*,
                 com.jivesoftware.forum.util.*"
%>
<%@ include file="/jive/global.jsp" %>
<%
	String message="操作失败!";
	//String web_account= request.getParameter("web_account")==null?"":request.getParameter("web_account");
	String username = request.getParameter("username") == null ? "" :request.getParameter("username");
	if(username!=null && !username.equals(""))
          username=username+"-user-web-"+web_account;
        String password = request.getParameter("password") == null ? "" :request.getParameter("password");
        String email = request.getParameter("email") == null ? "" :request.getParameter("email");
        String name = request.getParameter("name") == null ? "" :request.getParameter("name");
       
        String url="member_update.jsp?web_account="+web_account;
        boolean autoLogin =true;
        boolean errors=false;
        try{
                UserManager userManager = myEnv.getForumFactory().getUserManager();
                User user=userManager.getUser(username);
                user.setName(name);
                user.setPassword(password);
                user.setEmail(email);
            }
	catch (Exception uaee)
	    {
	    errors = true;
            }
if(errors)
  message="操作失败!";
else 
{
  message="操作成功!";
  //url="work.jsp?web_account="+web_account;
}
%>
<script language="javascript">
	function process ( message,url){
		alert(message);
		self.location = url;
	}
</script>
<html>
	<head>
		<title></title>
	</head>
	<body onload="javascript: process('<%=message%>','<%=url%>');">
	</body>
</html>