Exemple #1
0
        private static User CreateUserModelFromOpenAuthReponse(IAuthenticationResponse response, string identifier)
        {
            var simpleReg = response.GetExtension<ClaimsResponse>();
            var model = new ExTracker.Core.DataModel.User();
            model.OpenId = identifier;

            if (!string.IsNullOrEmpty(simpleReg.Email)) model.EmailAddress = simpleReg.Email;
            if (!string.IsNullOrEmpty(simpleReg.FullName)) model.Name = simpleReg.FullName;
            if (!string.IsNullOrEmpty(simpleReg.Nickname)) model.UserName = simpleReg.Nickname;
            return model;
        }
Exemple #2
0
 public InsertUserCommand(User user)
 {
     User = user;
 }