Skip to content

Commit

Permalink
Merge pull request #35 from joshilewis/master
Browse files Browse the repository at this point in the history
* Corrected bug in saving new UserAuth when creating or merging
  • Loading branch information
mythz committed Feb 2, 2014
2 parents 0b9ecb9 + cc9a4ba commit 86393c2
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -139,7 +139,7 @@ public UserAuth GetUserAuthByUserName(string userNameOrEmail)

public string CreateOrMergeAuthSession(IAuthSession authSession, IOAuthTokens tokens)
{
var userAuth = GetUserAuth(authSession, tokens) ?? new UserAuth();
var userAuth = GetUserAuth(authSession, tokens) ?? new UserAuthPersistenceDto();

var oAuthProvider = Session.QueryOver<UserOAuthProviderPersistenceDto>()
.Where(x => x.Provider == tokens.Provider)
Expand All @@ -162,7 +162,7 @@ public string CreateOrMergeAuthSession(IAuthSession authSession, IOAuthTokens to
if (userAuth.CreatedDate == default(DateTime))
userAuth.CreatedDate = userAuth.ModifiedDate;

Session.Save(new UserAuthPersistenceDto(userAuth));
Session.Save(userAuth);

oAuthProvider.UserAuthId = userAuth.Id;

Expand Down

0 comments on commit 86393c2

Please sign in to comment.