public UserRegistrationRequest(User user, string email, string username,
     string password,
     PasswordFormat passwordFormat,
     bool isApproved = true)
 {
     this.User = user;
     this.Email = email;
     this.Username = username;
     this.Password = password;
     this.PasswordFormat = passwordFormat;
     this.IsApproved = isApproved;
 }
        /// <summary>
        /// Inserts an activity log item
        /// </summary>
        /// <param name="systemKeyword">The system keyword</param>
        /// <param name="comment">The activity comment</param>
        /// <param name="customer">The customer</param>
        /// <param name="commentParams">The activity comment parameters for string.Format() function.</param>
        /// <returns>Activity log item</returns>
        public virtual ActivityLog InsertActivity(string systemKeyword,
            string comment, User user, params object[] commentParams)
        {
            if (user == null)
                return null;

            var activityTypes = GetAllActivityTypesCached();
            var activityType = activityTypes.ToList().Find(at => at.SystemKeyword == systemKeyword);
            if (activityType == null || !activityType.Enabled)
                return null;

            comment = CommonHelper.EnsureNotNull(comment);
            comment = string.Format(comment, commentParams);
            comment = CommonHelper.EnsureMaximumLength(comment, 4000);

            var activity = new ActivityLog();
            activity.ActivityLogTypeId = activityType.Id;
            activity.User = user;
            activity.Comment = comment;
            activity.CreatedOnUtc = DateTime.UtcNow;

            _activityLogRepository.Insert(activity);

            return activity;
        }
 public void SetUsername(User User, string newUsername)
 {
     throw new NotImplementedException();
 }
 public void SetEmail(User User, string newEmail)
 {
     throw new NotImplementedException();
 }