# 'Enable LDAP password changes per user' on OpenLDAP/PPolicy does not work

**URL:** <https://help.nextcloud.com/t/enable-ldap-password-changes-per-user-on-openldap-ppolicy-does-not-work/238110>\
**Category:** ℹ️ Support\
**Tags:** ldap, nc31\
**Created:** [January 3, 2026, 4:33pm UTC](https://help.nextcloud.com/t/enable-ldap-password-changes-per-user-on-openldap-ppolicy-does-not-work/238110 "2026-01-03T16:33:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marcogaio](https://help.nextcloud.com/letter_avatar/marcogaio/32/6_22734026db12803ebb3e059622ac3534.png) [@marcogaio](https://help.nextcloud.com/u/marcogaio)\
**Post date:** [January 3, 2026, 4:33pm UTC](https://help.nextcloud.com/t/enable-ldap-password-changes-per-user-on-openldap-ppolicy-does-not-work/238110/1 "2026-01-03T16:33:20Z")

</div>

> **Support intro**
>
> ## Sorry to hear you’re facing problems. 🙁
> 
> _The community help forum ([help.nextcloud.com](http://help.nextcloud.com)) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are **volunteering their time to help you.** _
> 
> **If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where Nextcloud engineers can help ensure your business keeps running smoothly.**
> 
> ## Getting help
> 
> In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.
> 
> **Before clicking submit** : Please check if your query is already addressed via the following resources:
> 
> - [Official documentation](https://docs.nextcloud.com) (searchable and regularly updated)
> - [How to topics and FAQs](https://help.nextcloud.com/c/how-to-faqs/9)
> - [Forum search](https://help.nextcloud.com/search)
> 
> (Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. ❤

## The Basics

- Nextcloud Server version _(e.g., 29.x.x)_:
  - **31.0.9**

- Operating system and version _(e.g., Ubuntu 24.04)_:
  - `debian bookworm`

- Web server and version _(e.g, Apache 2.4.25)_:
  - `Apache`

- PHP version _(e.g, 8.3)_:
  - `bookworm standard (`8.2.29-1~deb12u1)

### Summary of the issue you are facing:

I’ve enabled on my OpenLDAP backend PPolicy and (try to) enable Nextcloud password change; whenever i try to enable it (with LDSAP administrator bind or with anonyìmous bind, does not change) i face this error:

```auto
{"reqId":"GOVRfvZfkn5vYcIzvxwc","level":3,"time":"2026-01-03T17:15:06+01:00","remoteAddr":"192.168.1.254","user":"gaio","app":"index","method":"POST","url":"/index.php/login","message":"array_key_exists(): Argument #2 ($array) must be of type array, null given in file '/var/www/nextcloud/apps/user_ldap/lib/User/User.php' line 744","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0","version":"31.0.9.1","exception":{"Exception":"Exception","Message":"array_key_exists(): Argument #2 ($array) must be of type array, null given in file '/var/www/nextcloud/apps/user_ldap/lib/User/User.php' line 744","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1063,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":146,"Previous":{"Exception":"TypeError","Message":"array_key_exists(): Argument #2 ($array) must be of type array, null given","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/user_ldap/lib/User/User.php","line":744,"function":"array_key_exists"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":85,"function":"handlePasswordExpiry","class":"OCA\\User_LDAP\\User\\User","type":"->"},{"file":"/var/www/nextcloud/lib/private/Server.php","line":525,"function":"emit","class":"OC_Hook","type":"::"},{"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":[" ***sensitive parameters replaced***"]},{"file":"/var/www/nextcloud/lib/private/Hooks/EmitterTrait.php","line":88,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/lib/private/Hooks/PublicEmitter.php","line":22,"function":"emit","class":"OC\\Hooks\\BasicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/User/Session.php","line":350,"function":"emit","class":"OC\\Hooks\\PublicEmitter","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/CompleteLoginCommand.php","line":22,"function":"completeLogin","class":"OC\\User\\Session","type":"->","args":[" ***sensitive parameters replaced***"]},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\CompleteLoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/LoggedInCheckCommand.php","line":41,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\LoggedInCheckCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/EmailLoginCommand.php","line":51,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\EmailLoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/UidLoginCommand.php","line":36,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\UidLoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/UserDisabledCheckCommand.php","line":39,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/ALoginCommand.php","line":22,"function":"process","class":"OC\\Authentication\\Login\\UserDisabledCheckCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/PreLoginHookCommand.php","line":34,"function":"processNextOrFinishSuccessfully","class":"OC\\Authentication\\Login\\ALoginCommand","type":"->"},{"file":"/var/www/nextcloud/lib/private/Authentication/Login/Chain.php","line":45,"function":"process","class":"OC\\Authentication\\Login\\PreLoginHookCommand","type":"->"},{"file":"/var/www/nextcloud/core/Controller/LoginController.php","line":344,"function":"process","class":"OC\\Authentication\\Login\\Chain","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":200,"function":"tryLogin","class":"OC\\Core\\Controller\\LoginController","type":"->","args":[" ***sensitive parameters replaced***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1063,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/user_ldap/lib/User/User.php","Line":744},"message":"array_key_exists(): Argument #2 ($array) must be of type array, null given in file '/var/www/nextcloud/apps/user_ldap/lib/User/User.php' line 744","exception":{},"CustomMessage":"array_key_exists(): Argument #2 ($array) must be of type array, null given in file '/var/www/nextcloud/apps/user_ldap/lib/User/User.php' line 744"}}

```

If i disable it, things get back on work instantly.

I’ve tried to lookup this error on this forum and on google, but nothing relevant popups.

What i’m missing? Thanks.

---

<div class="post-metadata">

**Author:** ![jtr](https://help.nextcloud.com/letter_avatar/jtr/32/6_22734026db12803ebb3e059622ac3534.png) [@jtr](https://help.nextcloud.com/u/jtr)\
**Post date:** [January 3, 2026, 9:13pm UTC](https://help.nextcloud.com/t/enable-ldap-password-changes-per-user-on-openldap-ppolicy-does-not-work/238110/2 "2026-01-03T21:13:34Z")

</div>

I believe this was fixed in \>=v32, but I don’t see a backport of the bug fix to v31.

> <https://github.com/nextcloud/server/pull/53714>
>
> \* Resolves: # https://github.com/nextcloud/server/issues/53713
> 
> \## Summary
> On…ly attempt $result array access if array not empty.
> 
> \## TODO
> 
> \- \[\] ...
> 
> \## Checklist
> 
> \- Code is \[properly formatted\](https://docs.nextcloud.com/server/latest/developer\_manual/digging\_deeper/continuous\_integration.html#linting)
> \- \[Sign-off message\](https://github.com/src-d/guide/blob/master/developer-community/fix-DCO.md) is added to all commits
> \- \[\] Tests (\[unit\](https://docs.nextcloud.com/server/latest/developer\_manual/app\_development/tutorial.html#unit-tests), \[integration\](https://docs.nextcloud.com/server/latest/developer\_manual/app\_development/tutorial.html#integration-tests), api and/or acceptance) are included
> \- \[\] Screenshots before/after for front-end changes
> \- \[\] Documentation (\[manuals\](https://github.com/nextcloud/documentation/) or wiki) has been updated or is not required
> \- \[\] \[Backports requested\](https://github.com/nextcloud/backportbot/#usage) where applicable (ex: critical bugfixes)

I’ll trigger a backport now to get it into upcoming v31 maintenance release.

---

<div class="post-metadata">

**Author:** ![system](https://help.nextcloud.com/user_avatar/help.nextcloud.com/system/32/29333_2.png) [@system](https://help.nextcloud.com/u/system)\
**Post date:** [April 3, 2026, 9:13pm UTC](https://help.nextcloud.com/t/enable-ldap-password-changes-per-user-on-openldap-ppolicy-does-not-work/238110/3 "2026-04-03T21:13:35Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
