Blameable Console?

Ive finally finished developing my backend and now I’m looking into the console app for my scheduled tasks, eg monthly db cleanup, error checking ect.

I’ve implemented user authorization and the blameable behavior to all my tables. All model classes are in the common dir as they are used by all applications.

Question is, how will the console app behave with the blameable behavior which uses the user id? Ive found one other post which refers to Yii 1.1 but im not sure if this was addressed or even applies in Yii 2.0.2

Any Ideas before I continue?

It won’t crash but also it won’t write any value because there are none.

Alright, getting an exception was my main concern.

Is there a way to manually assign the console to a user in the database without authenticating?

-or-

If I manually assign the values in the controller before saving the model would the blameable behavior overwrite the values I specified?

Thanks for the help samdark!

By default it will overwrite the value but you can configure it. Check API docs.