Skip to content

Commit

Permalink
Merge pull request #370 from csakshaug/patch-1
Browse files Browse the repository at this point in the history
Update src/ServiceStack.ServiceInterface/Auth/RedisAuthRepository.cs
  • Loading branch information
mythz committed Dec 10, 2012
2 parents b443e71 + 716d9e5 commit 6229a15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ServiceStack.ServiceInterface/Auth/RedisAuthRepository.cs
Expand Up @@ -272,7 +272,15 @@ public void SaveUserAuth(UserAuth userAuth)
userAuth.CreatedDate = userAuth.ModifiedDate;

using (var redis = factory.GetClient())
{
redis.Store(userAuth);

var userId = userAuth.Id.ToString(CultureInfo.InvariantCulture);
if (!userAuth.UserName.IsNullOrEmpty())
redis.SetEntryInHash(IndexUserNameToUserId, userAuth.UserName, userId);
if (!userAuth.Email.IsNullOrEmpty())
redis.SetEntryInHash(IndexEmailToUserId, userAuth.Email, userId);
}
}

public List<UserOAuthProvider> GetUserOAuthProviders(string userAuthId)
Expand Down

0 comments on commit 6229a15

Please sign in to comment.