rem: var newUser = app.registerUser(param.name, param.password1); if (newUser) { 
add: var newUser = app.registerUser(param.name, param.password1); if (newUser) { 
context: function evalRegistration(param) {   var result;   // check if email-address is valid   if (!param.email)      result = getError("emailMissing");   else if (!checkEmail(param.email))      result = getError("emailInvalid");   // check if passwords match	if (!param.password1 || !param.password2)	   result = getError("passwordTwice");	else if (param.password1 != param.password2)      result = getError("passwordNoMatch");   // check if username is existing and is clean   // can't use global isClean() here because we accept   // special characters like umlauts and spaces   var invalidChar = new RegExp("[^a-zA-Z0-9\\.\\-_ ]");   if (!param.name)      result = getError("unameMissing");   else if (invalidChar.exec(param.name))      result = getError("unameNoSpecialChars");   else {      // check if username is similar to a built in function      if (this[param.name] || this[param.name + "_action"])         result = getError("unameExisting");   }   if (!result) {		var newUser = app.registerUser(param.name, param.password1); 		if (newUser) {         newUser.name = param.name;			newUser.email = param.email;			newUser.publishemail = param.publishemail;         newUser.url = evalURL(param.url);         newUser.description = param.description;         newUser.registered = new Date();         newUser.blocked = 0;         // grant trust and sysadmin-rights if there's no sysadmin 'til now         if (root.manage.sysadmins.size() == 0)            newUser.sysadmin = newUser.trusted = 1;         else            newUser.sysadmin = newUser.trusted = 0;         if (path.site) {            var welcomeWhere = path.site.title;            // if user registered within a public site, we add this site to favorites            if (path.site.online)               this.addMembership(newUser);         } else            var welcomeWhere = root.getSysTitle();			result = getConfirm("welcome",new Array(welcomeWhere,newUser.name));         result.username = newUser.name;         result.password = newUser.password;		} else 			result = getError("memberExisting");	}	return (result);}
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/993/79aaa88b9acd45afed8bbe8a64dafb337c2f8ef3/objectFunctions.js/buggy/code/MemberMgr/objectFunctions.js