private BackOfficeIdentityUser AssignLoginsCallback(BackOfficeIdentityUser user) { if (user != null) { var userId = UserIdToInt(user.Id); user.SetLoginsCallback(new Lazy <IEnumerable <IIdentityUserLogin> >(() => _externalLoginService.GetExternalLogins(userId))); user.SetTokensCallback(new Lazy <IEnumerable <IIdentityUserToken> >(() => _externalLoginService.GetExternalLoginTokens(userId))); } return(user); }