Skip to content

This will remove the user's role from the currently logged in user when setting New Relic attributes #34

@EHLOVader

Description

@EHLOVader

The init method is changing the currently logged in user's roles while setting the user attributes for New Relic.

It is using array_shift which will not just return the first element of the array but will also remove it, reindex the array, and reset the pointer.

I know this isn't really well maintained, actually have moved on to a different plugin for this, but wanted to let you know, because the issues were very odd to troubleshoot and find so others might have old sites with this that have experienced this.

What happened is that locally, without New Relic the issue was not present, but on the production and staging servers it was present.

I think I'd recommend updating this to use reset that simply resets the pointer and returns the first element of the array.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions