rem: cocoon.sendPage("redirect.html", { "url" : redirectUri }); 
add: cocoon.redirectTo(redirectUri); 
context: function addUser(ldap) {	resolve();	try {        var redirectUri = getRequestUri();			var userId = "";				var ldapId = null;		if (ldap) {			ldapId = "";		}				var email = "";		var fullName = "";		var description = "";		var messages = new Packages.java.util.ArrayList();		var password = "";		var confirmPassword = "";		var userManager = getAccreditableManager().getUserManager();				var ready = false;		while (!ready) {			cocoon.sendPageAndWait("users/profile.xml", {				"page-title" : "Add User",				"user-id" : userId,		    	"fullname" : fullName,		    	"email" : email,		    	"description" : description,		    	"messages" : messages,		    	"ldap-id" : ldapId,	    		"password" : password,	    		"confirm-password" : confirmPassword,	    		"new-user" : true,	    		"ldap" : ldap			});					    if (cocoon.request.get("submit")) {				userId = cocoon.request.get("userid");				email = cocoon.request.get("email");				fullName = cocoon.request.get("fullname");				description = cocoon.request.get("description");				ldapId = cocoon.request.get("ldapid");				password = cocoon.request.get("new-password");				confirmPassword = cocoon.request.get("confirm-password");							    var configDir = userManager.getConfigurationDirectory();					messages = validate(userManager, ldap, userId, email, password, confirmPassword, ldapId, configDir);								if (messages.isEmpty()) {					var user;					if (ldap) {						user = new Packages.org.apache.lenya.ac.ldap.LDAPUser(configDir, userId, email, ldapId);					}					else {						user = new Packages.org.apache.lenya.ac.file.FileUser(configDir, userId, fullName, email, "");						user.setName(fullName);						user.setPassword(password);					}										user.setDescription(description);					user.save();					userManager.add(user);					ready = true;				}		    }		    else {		    	ready = true;		    }		}	   	cocoon.sendPage("redirect.html", { "url" : redirectUri });   	}   	finally {   		release();   	}}
meta: 791	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/791/5b9c6ae2fb641effa76e35efe68abb2bee660da7/user-admin.js/buggy/src/webapp/lenya/content/admin/users/user-admin.js