Skip to content

user records ineditable due to logs written to root node #705

@kitzberger

Description

@kitzberger

With the new login successful/failed logs (see 69c805f) a fe_users record becomes ineditable in the backend for non-admins due to these log records being with pid=0.

When trying to edit a FE user with a state=STATUS_FRONTEND_LOGIN_FAILED log entries:

Image

Maybe just do this?

    public function log($state, ?User $user = null, array $additionalProperties = []): void
    {
        if (!ConfigurationUtility::isDisableLogActive()) {
            $log = GeneralUtility::makeInstance(Log::class);
            $log->setTitle(LocalizationUtility::translateByState($state));
            $log->setState($state);

            if ($user) {
                $log->setUser($user);
+               $log->setPid($user->getPid());
            }

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