[GH-ISSUE #21465] issue: USER_EMAIL variable not working #58156

Closed
opened 2026-05-05 22:26:11 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @HennieLP on GitHub (Feb 16, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21465

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.8.0 and v0.8.1 and v0.8.2

Ollama Version (if applicable)

No response

Operating System

Debian 13 / Ubuntu 24

Browser (if applicable)

Safari / Microsoft Edge

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

{{USER_EMAIL}} will return the email of the User

Actual Behavior

{{USER_EMAIL}} returns unknown

Image

Steps to Reproduce

Create a model with the system promt Email: {{USER_EMAIL}} an ask the model, "What's my email?" or look in the API call

Logs & Screenshots

Image

Additional Information

We are using OAuth, so maybe that could be the problem, but under admin settings the email is listed. I already wrote in #20881 but because this is a more complex problem, I moved it to its own issue.

I already tried it in 2 completely different environments. And with local user and OAuth user

Originally created by @HennieLP on GitHub (Feb 16, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/21465 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.8.0 and v0.8.1 and v0.8.2 ### Ollama Version (if applicable) _No response_ ### Operating System Debian 13 / Ubuntu 24 ### Browser (if applicable) Safari / Microsoft Edge ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior {{USER_EMAIL}} will return the email of the User ### Actual Behavior {{USER_EMAIL}} returns unknown <img width="219" height="143" alt="Image" src="https://github.com/user-attachments/assets/5d260dba-0ec3-40e6-afd8-73754fab3c8a" /> ### Steps to Reproduce Create a model with the system promt Email: {{USER_EMAIL}} an ask the model, "What's my email?" or look in the API call ### Logs & Screenshots <img width="219" height="143" alt="Image" src="https://github.com/user-attachments/assets/5d260dba-0ec3-40e6-afd8-73754fab3c8a" /> ### Additional Information We are using OAuth, so maybe that could be the problem, but under admin settings the email is listed. I already wrote in #20881 but because this is a more complex problem, I moved it to its own issue. I already tried it in 2 completely different environments. And with local user and OAuth user
GiteaMirror added the bug label 2026-05-05 22:26:11 -05:00
Author
Owner

@Classic298 commented on GitHub (Feb 16, 2026):

works for me, cannot reproduce here.

Need more steps to reproduce or setup details.
Does your account have an email address?

Obviously it gets replaced by "Unknown" which in the .ts code is the fallback for if the email could not be retrieved.

<!-- gh-comment-id:3907710511 --> @Classic298 commented on GitHub (Feb 16, 2026): works for me, cannot reproduce here. Need more steps to reproduce or setup details. Does your account have an email address? Obviously it gets replaced by "Unknown" which in the .ts code is the fallback for if the email could not be retrieved.
Author
Owner

@HennieLP commented on GitHub (Feb 16, 2026):

Yes, both users have an email adress Image Docker Compose:

open-webui:
    image: ghcr.io/open-webui/open-webui:main
    container_name: open-webui
    volumes:
      - ./open-webui:/app/backend/data
    depends_on:
      - ollama
    ports:
      - 80:8080
    environment:
      - OLLAMA_BASE_URL=http://ollama:11434
      - WEBUI_SECRET_KEY= redacted
      - OAUTH_USERNAME_CLAIM=preferred_username
      - OAUTH_CLIENT_ID= redacted
      - OAUTH_CLIENT_SECRET=redacted
      - OAUTH_PROVIDER_NAME=authentik
      - OPENID_PROVIDER_URL=https://redacted/application/o/ai/.well-known/openid-configuration
      - OPENID_REDIRECT_URI=https://redacted/oauth/oidc/callback
      - WEBUI_URL=https://ai.redacted
      - ENABLE_OAUTH_SIGNUP=true
      - ENABLE_LOGIN_FORM=false
      - OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true
      - ENABLE_FORWARD_USER_INFO_HEADERS=True
      - ENABLE_RAG_WEB_SEARCH=true
      - RAG_WEB_SEARCH_ENGINE=searxng
      - RAG_WEB_SEARCH_RESULT_COUNT=3
      - RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10
      - SEARXNG_QUERY_URL=http://searxng:8080/search?q=<query>
    extra_hosts:
      - host.docker.internal:host-gateway
    restart: unless-stopped
<!-- gh-comment-id:3907757974 --> @HennieLP commented on GitHub (Feb 16, 2026): Yes, both users have an email adress <img width="1350" height="159" alt="Image" src="https://github.com/user-attachments/assets/79b8d6b7-727d-4f80-b02a-f12591ade4be" /> Docker Compose: ``` open-webui: image: ghcr.io/open-webui/open-webui:main container_name: open-webui volumes: - ./open-webui:/app/backend/data depends_on: - ollama ports: - 80:8080 environment: - OLLAMA_BASE_URL=http://ollama:11434 - WEBUI_SECRET_KEY= redacted - OAUTH_USERNAME_CLAIM=preferred_username - OAUTH_CLIENT_ID= redacted - OAUTH_CLIENT_SECRET=redacted - OAUTH_PROVIDER_NAME=authentik - OPENID_PROVIDER_URL=https://redacted/application/o/ai/.well-known/openid-configuration - OPENID_REDIRECT_URI=https://redacted/oauth/oidc/callback - WEBUI_URL=https://ai.redacted - ENABLE_OAUTH_SIGNUP=true - ENABLE_LOGIN_FORM=false - OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true - ENABLE_FORWARD_USER_INFO_HEADERS=True - ENABLE_RAG_WEB_SEARCH=true - RAG_WEB_SEARCH_ENGINE=searxng - RAG_WEB_SEARCH_RESULT_COUNT=3 - RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10 - SEARXNG_QUERY_URL=http://searxng:8080/search?q=<query> extra_hosts: - host.docker.internal:host-gateway restart: unless-stopped ```
Author
Owner

@HennieLP commented on GitHub (Feb 16, 2026):

Image it works via the Playground but doesn't work if I do the same via Workspace -> Models -> New Model -> system prompt. "The mail of the User {{USER_EMAIL}}" and ask the AI, "whats my mail?" Also spun up an New Deployment with no Environment variables and the Problem Persists

<!-- gh-comment-id:3907848351 --> @HennieLP commented on GitHub (Feb 16, 2026): <img width="455" height="239" alt="Image" src="https://github.com/user-attachments/assets/738e82e2-3bba-4ce7-aa7b-babf919c7f82" /> it works via the Playground but doesn't work if I do the same via Workspace -> Models -> New Model -> system prompt. "The mail of the User {{USER_EMAIL}}" and ask the AI, "whats my mail?" Also spun up an New Deployment with no Environment variables and the Problem Persists
Author
Owner

@Classic298 commented on GitHub (Feb 16, 2026):

Ok. I will test models.

Can you test if it works for prompts for you (for me, it works for prompts)

Will report back later

<!-- gh-comment-id:3908041372 --> @Classic298 commented on GitHub (Feb 16, 2026): Ok. I will test models. Can you test if it works for prompts for you (for me, it works for prompts) Will report back later
Author
Owner

@Classic298 commented on GitHub (Feb 16, 2026):

Ok yeah for models i can reproduce. Very interesting. Only model system prompt seems to be affected

<!-- gh-comment-id:3908098195 --> @Classic298 commented on GitHub (Feb 16, 2026): Ok yeah for models i can reproduce. Very interesting. Only model system prompt seems to be affected
Author
Owner

@Classic298 commented on GitHub (Feb 16, 2026):

https://github.com/open-webui/open-webui/pull/21479

<!-- gh-comment-id:3909048876 --> @Classic298 commented on GitHub (Feb 16, 2026): https://github.com/open-webui/open-webui/pull/21479
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#58156