Closed marcoadasilvaa closed 6 years ago
It's not saving the user id on console because by default the console does not do users. We explicitly check for this.
You'll have to add this manually to the entry. You could perhaps link to the onAfterRequest
event before the Audit module is loaded and manually add the user id. It is a bit of an edge case that we can't support.
Hello team.
When have a cron with console command, don't register the user_id provider by Yii::$app->user->identity->id. Audit set by default "Guest"
I set identity user with next code:
But I can not register the authenticated user console