Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use \DDTrace\set_user() in its Laravel authentication module #1920

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bwoebi
Copy link
Collaborator

@bwoebi bwoebi commented Feb 10, 2023

Description

Relates to #1909.

It has no tests yet, just to show off for now.

Readiness checklist

  • (only for Members) Changelog has been added to the release document.
  • Tests added for this feature/bug.

Reviewer checklist

  • Appropriate labels assigned.
  • Milestone is set.
  • Changelog has been added to the release document. For community contributors the reviewer is in charge of this task.

@NickStallman
Copy link

Is the hook on SessionGuard::id() actually needed?

    public function id()
    {
        if ($this->loggedOut) {
            return;
        }

        return $this->user()
                    ? $this->user()->getAuthIdentifier()
                    : $this->session->get($this->getName());
    }

It just ends up calling SessionGuard::user() anyway, so likely just the hook on user() is needed?

@bwoebi
Copy link
Collaborator Author

bwoebi commented Feb 10, 2023

Indeed, it isn't :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants