public static function findIdentities($ids, $scope = null)
    {
        $query = static::find()->where(['id' => $ids]);
        if ($scope !== null) {
            if (is_array($scope)) {
                foreach ($scope as $value) {
                    $query->$value();
                }
            } else {
                $query->$scope();
            }
        }
        return $query->all();
    }
public static function findIdentities($ids, $scope = null)
    {
        $query = static::find()->where(['id' => $ids]);
        if ($scope !== null) {
            if (is_array($scope)) {
                foreach ($scope as $value) {
                    $query->$value();
                }
            } else {
                $query->$scope();
            }
        }
        return $query->all();
    }
public static function findIdentities ( $ ids , $ scope = null ) { $ query = static :: find ( ) -> where ( [ 'id' => $ ids ] ) ; if ( $ scope !== null ) { if ( is_array ( $ scope ) ) { foreach ( $ scope as $ value ) { $ query -> $ value ( ) ; } } else { $ query -> $ scope ( ) ; } } return $ query -> all ( ) ; }
Find users by IDs.

@param $ids Users IDs
@param null $scope Scope

@return array|\yii\db\ActiveRecord[] Users
Find users by IDs .