$users = Users::find()
->joinWith('userStatuses')
->where(['not in', UserStatuses::tableName().'.status_id', [1]])
->all();
$users = Users::find()
->joinWith(['userStatuses' => function (ActiveQuery $query) {
return $query
->andWhere([UserStatuses::tableName(). ' .user_id' => Users::tableName() . '.id']);
}])
->andWhere(['not in', UserStatuses::tableName().'.status_id', [1]])
//->andWhere(['not', ['in', UserStatuses::tableName().'.status_id', [1]]])
->all();