Skip to content

Commit

Permalink
fix: Add missing togglz for events in social sign in
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielPalafox committed Oct 31, 2023
1 parent a4c6d48 commit bd205ef
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.orcid.core.oauth.service.OrcidAuthorizationEndpoint;
import org.orcid.core.oauth.service.OrcidOAuth2RequestValidator;
import org.orcid.core.security.OrcidUserDetailsService;
import org.orcid.core.togglz.Features;
import org.orcid.core.utils.EventType;
import org.orcid.frontend.spring.web.social.config.SocialSignInUtils;
import org.orcid.frontend.spring.web.social.config.SocialType;
Expand Down Expand Up @@ -325,7 +326,9 @@ private ModelAndView processSocialLogin(HttpServletRequest request, HttpServletR
userConnectionId = userConnection.getId().getUserid();
// Store relevant data in the session
socialSignInUtils.setSignedInData(request, userData);
eventManager.createEvent(userConnection.getOrcid(), EventType.SIGN_IN, request, null);
if (Features.EVENTS.isActive()) {
eventManager.createEvent(userConnection.getOrcid(), EventType.SIGN_IN, request, null);
}

if(userConnection.isLinked()) {
// If user exists and is linked update user connection info
Expand Down

0 comments on commit bd205ef

Please sign in to comment.