Must be an instance of IdentityInterface

Argument 1 passed to app\components\Usuario::login() must be an instance of app\components\IdentityInterface, instance of app\models\Usuario given, called in C:\xampp1\htdocs\Projetos\Prospecta\models\SalesLoginForm.php on line 72
public function login()
        if ($this->validate()) {
            **return Yii::$app->usuario->login($this->getUser(), $this->lembrarSenha ? 3600*24*30 : 0);**
        return false;

can help me?

The error is pretty clear, your user model Usuario need to implement the IdentityInterface in order to be used in login function


namespace app\models;
use Yii;
use yii\helpers\Security;
use yii\db\ActiveRecord;
use yii\web\IdentityInterface;

use app\models\Funcionario as Funcionario;

class Usuario extends ActiveRecord implements IdentityInterface

my class Usuario

error is indicating this interface app\components\IdentityInterface not yii\web\IdentityInterface

Thank You so much