# Bug OP-16431 - LDAP sync not lockingusers if no values returned

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-16431

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 15.3.0 |
| Observed in versions |  |
| Sprint | 15.3.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) |  |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Steps to reproduce

1.  Enable `ldap_users_sync_status` in the OpenProject configuration.
    
2.  Trigger an LDAP sync to update user statuses (`Ldap::SynchronizationJob.perform_now`).
    
3.  Observe the behavior when inactive users are expected to be disabled.
    

#### **Preconditions**

*   You must have administrative permissions to configure LDAP settings and trigger synchronization.
    
*   The LDAP setup must include users marked as inactive.
    

### What is the buggy behavior?

When the `ldap_users_sync_status` feature is enabled, inactive users are not disabled during the synchronization process.

*   An error occurs due to a `.map` operation being executed on a `nil` object, which prevents the intended functionality.
    

### What is the expected behavior?

*   Inactive users from LDAP should be properly disabled in OpenProject after the synchronization process.
    
*   The synchronization process should complete without errors.
    

### Important note

I have identified and resolved the issue in the code. I will submit a pull request (PR) immediately after creating this work package.

### **Logs**

```text
Failed to synchronize user [ldap_auth]: undefined method `map' for nil
```

### Environment information

**OpenProject installation type**

*   Docker-compose installation
    
    <br>
    

**OpenProject version**

_v15.1_

<br>
