public class BroadleafSocialRegisterController extends BroadleafRegisterController {
//Pre-populate portions of the RegisterCustomerForm from ProviderSignInUtils.getConnection();
public String register(RegisterCustomerForm registerCustomerForm, HttpServletRequest request,
HttpServletResponse response, Model model) {
Connection<?> connection = ProviderSignInUtils.getConnection(new ServletWebRequest(request));
if (connection != null) {
UserProfile userProfile = connection.fetchUserProfile();
Customer customer = registerCustomerForm.getCustomer();
customer.setFirstName(userProfile.getFirstName());
customer.setLastName(userProfile.getLastName());