コード例 #1
0
        public override bool CreateCustomer(CustomerAccount u, out CreateUserStatus status, string clearPassword)
        {
            status = CreateUserStatus.None;
            var dnnStatus = UserCreateStatus.UnexpectedError;

            if (!string.IsNullOrEmpty(clearPassword))
            {
                u.Password = clearPassword;
            }

            DnnCustomerAccountRepository.CreateDnnAccount(u, PortalSettings.Current.PortalId, ref dnnStatus);

            switch (dnnStatus)
            {
            case UserCreateStatus.Success:
                status = CreateUserStatus.Success;
                break;

            case UserCreateStatus.DuplicateEmail:
                status = CreateUserStatus.DuplicateEmail;
                break;

            case UserCreateStatus.DuplicateUserName:
            case UserCreateStatus.UsernameAlreadyExists:
                status = CreateUserStatus.DuplicateUsername;
                break;

            case UserCreateStatus.InvalidPassword:
                status = CreateUserStatus.InvalidPassword;
                break;

            case UserCreateStatus.UserRejected:
                status = CreateUserStatus.UserRejected;
                break;

            default:
                status = CreateUserStatus.UpdateFailed;
                break;
            }

            _Logger.LogMessage(string.Format("DNN user account ({0}) create status == {1}.", u.Username, status));

            return(status == CreateUserStatus.Success);
        }
コード例 #2
0
 public DnnMembershipServices(HccRequestContext context)
     : base(context)
 {
     Customers = new DnnCustomerAccountRepository(Context);
 }
コード例 #3
0
 public override void UpdateUserSettings(string userId, Dictionary <string, string> settings,
                                         bool getCached = true)
 {
     DnnCustomerAccountRepository.UpdateUserSettings(userId, settings, getCached);
 }
コード例 #4
0
 public override Dictionary <string, string> GetUserSettings(string userId, bool getCached = true)
 {
     return(DnnCustomerAccountRepository.GetUserSettings(userId, getCached));
 }