throw new BadRequestException( locale.getString("www.error.passwordsDontMatch") );
if ( !v.isValidEmail(email) )
throw new BadRequestException( locale.getString("www.error.invalidEmail") );
if ( v.usernameExists(name) )
throw new BadRequestException( locale.getString("www.error.duplicateUsername") );
if ( v.emailExists(email) )
throw new BadRequestException( locale.getString("www.error.duplicateEmail") );
User newUser = new User( -1, name, pass1, email );
newUser.setActive( !p.get(Constants.WWW_USERS_REQUIRE_ACTIVATION).equals(Properties.YES) );
newUser.save( db );