BlameableBehavior sequence

I have successfully added the TimaestampBehavior code with DateTime and it records both create and update on user signup.

When I add the BlameableBehavior I am not getting the newly created userid added. (have not tried the update yet).

What i am wondering is if i am thinking of this wrong.

I was thinking that as the new user signs up, there new id would be used for the blameable.

Or is it only used when an already signed in user creates a new user/record?

public function behaviors()


        return [


                'class' => TimestampBehavior::className(),

                'value' => new Expression('NOW()'), // Override time() timestamp



                'class' => BlameableBehavior::className(),




Thanks for any help given.



^ This.

Your "Problem" is:

When you register a new user the record will be created in DB before this user is logged in.

Therefore the user has no ID that can be used for the blameable behavior.

Best Regards

Thank you for the reply and that makes perfect sense.