Skip to content

[Bug]: $this->session->get('user_id') returns null since PR 62241 (in dev environment) #63137

Description

@Sector6759

⚠️ This issue respects the following points: ⚠️

Bug description

I'm using https://github.com/nextcloud/nextcloud-docker-dev for local development of a Nextcloud app. Using the up to date nextcloud/server master branch within the dev repo, a call to $this->session->get('user_id') returns null. I couldn't find the exact change that causes this but I narrowed it down to the PR #62241. Before that PR was merged into master, $this->session->get('user_id') would return the session's user ID.

Steps to reproduce

  1. Setup https://github.com/nextcloud/nextcloud-docker-dev
  2. Configure a debugger
  3. Set a breakpoint in a file using $this->session->get('user_id') (I used workspace/server/lib/private/DateTimeZone.php line 30 for this)
  4. Start the dev environment
  5. Open the local Nextcloud instance with your browser
  6. Login as admin
  7. Enable debugging in the docker container
  8. Start debugging
  9. Refresh the browser page
  10. Observe $this->session->get('user_id') returning null

Expected behavior

$this->session->get('user_id') should return the session's user ID, like it did before PR #62241

Nextcloud Server version

35 (master)

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap35-feedbackbug

    Type

    Projects

    Status
    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions