I did user authentication on yii2 and in the local it works just find but after when I pulled it to server I'm getting this error Class 'app\models\user' not found and this is the marked area I'm getting
$identity = $class::findIdentity($id);
When you are storing class name in variable, use full namespace with leading slash:
$class = '\app\models\User'; $identity = $class::findIdentity($id);
Also make sure the class with this name and namespace really exists.
And the class name should start with capital letter -
user. It helps to avoid possible problems with letter case on different OS.