Error while trying to override User component on advanced app

Hi folks,

I have added this to my backend config: -





    'components' => [

        'user' => [

            'class' => 'backend\components\user\User',

            'identityClass' => 'backend\models\user\User',

            'enableAutoLogin' => TRUE,

        ],

	



And I am getting the following error: -

[i]Invalid Configuration – yii\base\InvalidConfigException

"user" refers to a backend\components\user\User component. yii\web\User is expected[/i]

The namespace in the class is correct: -


namespace backend\components\user;

Any thoughts?

Does backend\components\user\User extend yii\web\User? Do you use any user management extension?

Read the error message more carefully :)

Yeah, I wasn’t extending from \yii\web\User >:(

Thanks guys. I’ve been coding all day, just did my last VCS commit after I had that issue thinking “I’ll bet this is something really obvious that I will notice when I start work on this again tomorrow…”.

Thanks again!

Now only the bed bugs will bite ;)

And that’s exactly where I am headed!