Examples of saveUserProfile()


Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

        WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
        UIApplication uiApp = context.getUIApplication();

        try {
            hanlder.saveUserProfile(userProfile, true);
        } catch (OAuthException gtnOauthOAuthException) {
            // Show warning message if user with this facebookUsername (or googleUsername) already exists
            if (gtnOauthOAuthException.getExceptionCode() == OAuthExceptionCode.DUPLICATE_OAUTH_PROVIDER_USERNAME) {
                addOAuthExceptionMessage(context, gtnOauthOAuthException, uiApp);
                return false;
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

            OrganizationService orgService = event.getSource().getApplicationComponent(OrganizationService.class);
            if (remoteUser != null) {
                UserProfile userProfile = orgService.getUserProfileHandler().findUserProfileByName(remoteUser);
                userProfile.getUserInfoMap().put(Constants.USER_SKIN, skin);
                UserProfileHandler hanlder = orgService.getUserProfileHandler();
                hanlder.saveUserProfile(userProfile, true);
            }
        }
    }

}
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

                HttpServletRequest httpRequest = portalRequestContext.getRequest();
                OAuthPrincipal oauthPrincipal = (OAuthPrincipal)authRegistry.getAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_OAUTH_PRINCIPAL);

                newUserProfile.setAttribute(oauthPrincipal.getOauthProviderType().getUserNameAttrName(), oauthPrincipal.getUserName());
                try {
                    profileHandler.saveUserProfile(newUserProfile, true);
                } catch (OAuthException gtnOAuthException) {
                    // Show warning message if user with this facebookUsername (or googleUsername) already exists
                    // NOTE: It could happen only in case of parallel registration of same oauth user from more browser windows
                    if (gtnOAuthException.getExceptionCode() == OAuthExceptionCode.DUPLICATE_OAUTH_PROVIDER_USERNAME) {
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

            }

            OAuthProviderProcessor<T> oauthProviderProcessor = oauthProviderType.getOauthProviderProcessor();
            oauthProviderProcessor.saveAccessTokenAttributesToUserProfile(userProfile, this, accessToken);

            userProfileHandler.saveUserProfile(userProfile, true);
        } catch (OAuthException oauthEx) {
            throw oauthEx;
        } catch (Exception e) {
            throw new OAuthException(OAuthExceptionCode.PERSISTENCE_ERROR, e);
        }
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

            }

            OAuthProviderProcessor<T> oauthProviderProcessor = oauthProviderType.getOauthProviderProcessor();
            oauthProviderProcessor.removeAccessTokenFromUserProfile(userProfile);

            userProfileHandler.saveUserProfile(userProfile, true);
        } catch (Exception e) {
            throw new OAuthException(OAuthExceptionCode.PERSISTENCE_ERROR, e);
        }
    }
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

            userProfile.setAttribute(oauthProviderType.getUserNameAttrName(), oauthUsername);

            OAuthProviderProcessor<T> oauthProviderProcessor = oauthProviderType.getOauthProviderProcessor();
            oauthProviderProcessor.saveAccessTokenAttributesToUserProfile(userProfile, this, accessToken);
            userProfileHandler.saveUserProfile(userProfile, true);
        } catch (OAuthException oauthEx) {
            throw oauthEx;
        } catch (Exception e) {
            throw new OAuthException(OAuthExceptionCode.PERSISTENCE_ERROR, e);
        }
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

            // continue;
            userProfile.getUserInfoMap().put(uiInput.getName(), uiInput.getValue());
         }
      }

      hanlder.saveUserProfile(userProfile, true);

      Object[] args = {"UserProfile", user_};
      WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
      UIApplication uiApp = context.getUIApplication();
      if (isnewUser)
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

         if (remoteUser != null)
         {
            UserProfile userProfile = orgService.getUserProfileHandler().findUserProfileByName(remoteUser);
            userProfile.getUserInfoMap().put(Constants.USER_LANGUAGE, language);
            UserProfileHandler hanlder = orgService.getUserProfileHandler();
            hanlder.saveUserProfile(userProfile, true);
         }
      }
   }

   private String capitalizeFirstLetter(String word)
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

         if (remoteUser != null)
         {
            UserProfile userProfile = orgService.getUserProfileHandler().findUserProfileByName(remoteUser);
            userProfile.getUserInfoMap().put(Constants.USER_SKIN, skin);
            UserProfileHandler hanlder = orgService.getUserProfileHandler();
            hanlder.saveUserProfile(userProfile, true);
         }
      }
   }

}
View Full Code Here

Examples of org.exoplatform.services.organization.UserProfileHandler.saveUserProfile()

                HttpServletRequest httpRequest = portalRequestContext.getRequest();
                OAuthPrincipal oauthPrincipal = (OAuthPrincipal)authRegistry.getAttributeOfClient(httpRequest, OAuthConstants.ATTRIBUTE_AUTHENTICATED_OAUTH_PRINCIPAL);

                newUserProfile.setAttribute(oauthPrincipal.getOauthProviderType().getUserNameAttrName(), oauthPrincipal.getUserName());
                try {
                    profileHandler.saveUserProfile(newUserProfile, true);
                } catch (OAuthException gtnOAuthException) {
                    // Show warning message if user with this facebookUsername (or googleUsername) already exists
                    // NOTE: It could happen only in case of parallel registration of same oauth user from more browser windows
                    if (gtnOAuthException.getExceptionCode() == OAuthExceptionCode.DUPLICATE_OAUTH_PROVIDER_USERNAME) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.