private function resolveObject($loginProperty, array $credentials)
    {
        return $this->om->getRepository($this->modelName)->findOneBy([
            $loginProperty => $credentials[$loginProperty],
        ]);
    }
private function resolveObject($loginProperty, array $credentials)
    {
        return $this->om->getRepository($this->modelName)->findOneBy([
            $loginProperty => $credentials[$loginProperty],
        ]);
    }
private function resolveObject ( $ loginProperty , array $ credentials ) { return $ this -> om -> getRepository ( $ this -> modelName ) -> findOneBy ( [ $ loginProperty => $ credentials [ $ loginProperty ] , ] ) ; }
Simple helper which searches the ObjectManager by the given login parameter.

@param string $loginProperty
@param array  $credentials

@return object
Simple helper which searches the ObjectManager by the given login parameter .