I have this code to find a user from db which status is active and role is user
public static function findByUsername($username)
{
return static::find(['username' => $username, 'status' => static::STATUS_ACTIVE, 'role'=>'user']);
}
I need to find a user that role is not equal to "user". How can I do this?
P.S: I'm using YII2