Skip to content

Commit

Permalink
fixup! social-login: Provide option which sync with local user name
Browse files Browse the repository at this point in the history
  • Loading branch information
doortts committed Feb 15, 2017
1 parent d3d9d2e commit f554898
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/service/YonaUserServicePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ public Object getLocalIdentity(final AuthUserIdentity identity) {
// ...and dont forget to sync the cache when users get deactivated/deleted
final UserCredential u = UserCredential.findByAuthUserIdentity(identity);
if(u != null) {
if(useSocialNameSync && identity instanceof BasicIdentity){
if(identity instanceof BasicIdentity){
BasicIdentity authUser = ((BasicIdentity) identity);
setStatusLoggedIn(u, authUser);
if(!u.name.equals(authUser.getName())){
if(useSocialNameSync && !u.name.equals(authUser.getName())){
updateLocalUserName(u, authUser);
}
}
Expand Down

0 comments on commit f554898

Please sign in to comment.