# LDAP plugin always auth\_overrides\_username

**URL:** https://meta.discourse.org/t/ldap-plugin-always-auth-overrides-username/213908
**Category:** Support
**Created:** [January 5, 2022, 11:42am UTC](https://meta.discourse.org/t/ldap-plugin-always-auth-overrides-username/213908 "2022-01-05T11:42:30Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [January 5, 2022, 11:42am UTC](https://meta.discourse.org/t/ldap-plugin-always-auth-overrides-username/213908/1 "2022-01-05T11:42:30Z")

</div>

We habe a serious issue after updating to the latest 2.8.0.Beta10: _disabling_ the setting

auth\_overrides\_username

seems to have no effect. The box is unchecked, but after every Logout/Login process, the user-selected username is overwritten with the LDAP name. Can someone confirm this?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 5, 2022, 11:50am UTC](https://meta.discourse.org/t/ldap-plugin-always-auth-overrides-username/213908/2 "2022-01-05T11:50:25Z")

</div>

At the moment the LDAP plugin [specifically enables](https://github.com/jonmbake/discourse-ldap-auth/blob/master/lib/ldap_user.rb#L19) the `overrides_username` setting. Maybe it should simply rely on core’s `auth_overrides_username` setting, or introduce a new site setting.

The LDAP plugin is not an official plugin, and I don’t think the author is active here on Meta, so you might need to open an issue on [the repository](https://github.com/jonmbake/discourse-ldap-auth).

---

<div class="post-metadata">

### Author: ![Ralf\_Stockmann](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ralf_stockmann/32/505867_2.png) [@Ralf\_Stockmann](https://meta.discourse.org/u/Ralf_Stockmann)
#### Post date: [January 5, 2022, 11:59am UTC](https://meta.discourse.org/t/ldap-plugin-always-auth-overrides-username/213908/3 "2022-01-05T11:59:50Z")

</div>

Thanks for the quick response. Is this already solved by this PR?

[https://github.com/jonmbake/discourse-ldap-auth/pull/67](https://github.com/jonmbake/discourse-ldap-auth/pull/67)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 5, 2022, 12:12pm UTC](https://meta.discourse.org/t/ldap-plugin-always-auth-overrides-username/213908/4 "2022-01-05T12:12:05Z")

</div>

That won’t fix it. Although now that you mention it, that PR probably introduced this behaviour change.

Some context: we removed an old ‘omit username’ flag from core, which the LDAP plugin was using. It was extremely similar to the overrides\_username setting, which is why I simply substituted them in the LDAP plugin. **However,** as you’ve noticed, `omit_username` only applied during initial signup, while `overrides_username` applies on every login.

Here’s a PR to reverse that behaviour change. We’ll need @jonmbake to merge

[https://github.com/jonmbake/discourse-ldap-auth/pull/69](https://github.com/jonmbake/discourse-ldap-auth/pull/69)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 5, 2022, 5:00pm UTC](https://meta.discourse.org/t/ldap-plugin-always-auth-overrides-username/213908/5 "2022-01-05T17:00:34Z")

</div>

@Ralf_Stockmann that PR is now merged, so the old behaviour should be restored once you update the plugin

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [January 6, 2022, 8:00am UTC](https://meta.discourse.org/t/ldap-plugin-always-auth-overrides-username/213908/6 "2022-01-06T08:00:36Z")

</div>

This topic was automatically closed after 15 hours. New replies are no longer allowed.
