code: public ApplicationUser newLocalUserBasedOn(
              final String username,
              final Password password,
              final Password passwordRepeat,
              final ApplicationUser userWhosRolesShouldBeCloned,
              final Boolean enabled,
              final String emailAddress) {
          final ApplicationUser user = this.newLocalUser(username, password, passwordRepeat, null, enabled, emailAddress);
          for (ApplicationRole role : userWhosRolesShouldBeCloned.getRoles()) {
              user.addToRoles(role);
          }
          return user;
      }
docs: region > newLocalUserBasedOn (action)