src/Flowcode/UserBundle/Service/UserService.php
public function isUnique($username, $email, $dni = null, $code = null)
    {
        $entities = $this->getEm()->getRepository("AmulenUserBundle:User")->findByUniques($username, $email, $dni, $code);
        return count($entities) <= 0;
    }
public function isUnique($username, $email, $dni = null, $code = null)
    {
        $entities = $this->getEm()->getRepository("AmulenUserBundle:User")->findByUniques($username, $email, $dni, $code);
        return count($entities) <= 0;
    }
public function isUnique ( $ username , $ email , $ dni = null , $ code = null ) { $ entities = $ this -> getEm ( ) -> getRepository ( "AmulenUserBundle:User" ) -> findByUniques ( $ username , $ email , $ dni , $ code ) ; return count ( $ entities ) <= 0 ; }
Check if is unique.
@param  [type]  $username [description]
@param  [type]  $email    [description]
@param  [type]  $phone    [description]
@param  [type]  $dni      [description]
@param  [type]  $code     [description]
@return boolean           [description]
Check if is unique .