question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable user lockout

See original GitHub issue

I want to disable user lockout by default for all users. I already checked some ways but no success. Firstly, i set IsLockoutEnabled = false in User class, but when i create user, this column value is 1 in DB.

        public override async Task<UserDto> Create(CreateUserDto input)
        {
            CheckCreatePermission();

            var user = ObjectMapper.Map<User>(input);

            user.TenantId = AbpSession.TenantId;
            user.Password = new PasswordHasher().HashPassword(input.Password);
            user.IsEmailConfirmed = true;

            //Assign roles
            user.Roles = new Collection<UserRole>();
            foreach (var roleName in input.RoleNames)
            {
                var role = await _roleManager.GetRoleByNameAsync(roleName);
                user.Roles.Add(new UserRole(AbpSession.TenantId, user.Id, role.Id));
            }

            CheckErrors(await _userManager.CreateAsync(user));

            return MapToEntityDto(user);
        }

Here, UserAppService Create method, before CheckErrors method call IsLockoutEnabled is set to false, but after that line it is true. Then, i checked to set UserLockoutEnabledByDefault to false in UserManager class, but again it is 1 in DB, when user created.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

disable the account lockout policy for one user
hi community. I want disable the account lockout policy for one local user only. All local users should have account lockout after 4...
Read more >
Account Lockout Policy - Windows Security
The Account Lockout Policy settings can be configured in the following location in the Group Policy Management Console: Computer Configuration\ ...
Read more >
Enable or Disable Built-in Administrator Account Lockout ...
1 Open Local Security Policy (secpol. · 2 Double click/tap on Account Policies in the left pane to expand, and click/tap on Account...
Read more >
How can I disable account lockout policy for one user in a ...
There are legitimate use cases for disabling lock out on a single account. A significant amount of releases and migrations are not thoroughly ......
Read more >
How to Configure Account Lockout Policy in Active Directory?
Navigate to Computer Configuration > Policies > Windows Settings > Security Settings > Account Policies > Account Lockout Policy. gpo lockout ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found