Configure user slugs separate from display names #6120

Open
opened 2026-04-29 12:41:49 +02:00 by Tomblarom · 1 comment

Describe the feature you'd like

Currently user-slugs, are generated automatically based on the display name (set by OIDC_DISPLAY_NAME_CLAIMS). For example the user John Doe will receive the slug john-doe (e.g. wiki.example.com/user/john-doe).

When using any SSO-provider, like LDAP / SAML / OIDC it should be possible to configure the use of a given username (e.g. DoeJ) instead of an automatically generated slug (john-doe).

In case this feature gets implemented, any existing slugs should be updated to the new schema automatically, so they stay consistent across the complete knowledge-base.

Describe the benefits this would bring to existing BookStack users

Many institutions and organizations that use BookStack identify users by their internal usernames rather than by generated full-name slugs. When using search filters such as {created_by:john-doe} or {updated_by:john-doe}, users may not know the exact first name, full name spelling, or automatically generated BookStack slug.

Using a known username such as {created_by:DoeJ} would make these filters easier to guess, teach, and use consistently.

The goal is to allow admins to configure the user identifier separately from the display name, so the display name can remain human-readable, for example John Doe, while the slug/search identifier can match the username used in the organization's identity system.

Can the goal of this request already be achieved via other means?

Partially, but not cleanly.

The display name can already be controlled through authentication mappings such as OIDC_DISPLAY_NAME_CLAIMS, but this also affects how the user is shown in the interface. The full display name should stay, while using a separate username-based slug.

It may be possible to manually edit slugs in the database, but this is not a supported or scalable approach.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?

3 months to 1 year

### Describe the feature you'd like Currently user-slugs, are generated automatically based on the display name (set by `OIDC_DISPLAY_NAME_CLAIMS`). For example the user `John Doe` will receive the slug `john-doe` (e.g. wiki.example.com/user/`john-doe`). When using any SSO-provider, like LDAP / SAML / OIDC it should be possible to configure the use of a given username (e.g. `DoeJ`) instead of an automatically generated slug (`john-doe`). In case this feature gets implemented, any existing slugs should be updated to the new schema automatically, so they stay consistent across the complete knowledge-base. ### Describe the benefits this would bring to existing BookStack users Many institutions and organizations that use BookStack identify users by their internal usernames rather than by generated full-name slugs. When using search filters such as `{created_by:john-doe}` or `{updated_by:john-doe}`, users may not know the exact first name, full name spelling, or automatically generated BookStack slug. Using a known username such as `{created_by:DoeJ}` would make these filters easier to guess, teach, and use consistently. The goal is to allow admins to configure the user identifier separately from the display name, so the display name can remain human-readable, for example `John Doe`, while the slug/search identifier can match the username used in the organization's identity system. ### Can the goal of this request already be achieved via other means? Partially, but not cleanly. The display name can already be controlled through authentication mappings such as `OIDC_DISPLAY_NAME_CLAIMS`, but this also affects how the user is shown in the interface. The full display name should stay, while using a separate username-based slug. It may be possible to manually edit slugs in the database, but this is not a supported or scalable approach. ### Have you searched for an existing open/closed issue? - [x] I have searched for existing issues and none cover my fundamental request ### How long have you been using BookStack? 3 months to 1 year
Owner

Thanks for the request @Tomblarom,
I can see the use case, but I'm not sure it'd be worthwhile to complicate all auth systems with extra options/process/testing to support it, relative to user demand.

I was thinking if we could instead provide a logical theme hook for user slug generation so that the logic used could be overridden to follow any logic desired, regardless of auth system or specific needs.
I think it would then be possible to combine that with our existing OIDC theme events to pass through other OIDC properties for use in such a generation (although I can't be sure of this without checking).

Updating existing slugs, from the perspective of an official solution, would be quite painful since we'd have to also search for references/use across a range of areas (use in content, use in comments etc...) but a simple update (ignoring those references) could potentially be done alongside the above logical theme system idea.

Thanks for the request @Tomblarom, I can see the use case, but I'm not sure it'd be worthwhile to complicate all auth systems with extra options/process/testing to support it, relative to user demand. I was thinking if we could instead provide a logical theme hook for user slug generation so that the logic used could be overridden to follow any logic desired, regardless of auth system or specific needs. I think it would then be possible to combine that with our existing OIDC theme events to pass through other OIDC properties for use in such a generation (although I can't be sure of this without checking). Updating existing slugs, from the perspective of an official solution, would be quite painful since we'd have to also search for references/use across a range of areas (use in content, use in comments etc...) but a simple update (ignoring those references) could potentially be done alongside the above logical theme system idea.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bookstack/bookstack#6120
No description provided.