Пример #1
0
        public void AddUser( User user, UserCredentials credentials )
        {
            credentials.UserId = user.Id;

            this.users.Add( user );
            this.userCredentials.Add( credentials );
        }
Пример #2
0
        public void AddUser( User user, UserCredentials credentials )
        {
            var users = database.GetCollection<User>( Collections.Users );
            users.Insert( user );

            credentials.UserId = user.Id;

            var userCredentials = database.GetCollection<UserCredentials>( Collections.UserCredentials );
            userCredentials.Insert( credentials );
        }
Пример #3
0
        private void AddUserFor( RegistrationRequest request )
        {
            var user = new User();
            user.Name = request.UserName;

            var credentials = new UserCredentials
            {
                EmailAddress = request.EmailAddress,
                EncryptedPassword = passwordEncryptor.Encrypt( request.Password1 ),
                AuthId = Guid.NewGuid()
            };
            database.AddUser( user, credentials );
        }
Пример #4
0
 public void UpdateUserCredentials( UserCredentials userCredentials )
 {
     // Nothing to do.  In-memory object already updated.
 }
Пример #5
0
 public void UpdateUserCredentials( UserCredentials userCredentials )
 {
     database
         .GetCollection<UserCredentials>( Collections.UserCredentials )
         .Save( userCredentials );
 }