Fixing error while auto merging.

skala
Julio Montoya 11 years ago
parent ec4a10e984
commit f46b4dad5c
  1. 25
      main/inc/Entity/Repository/UserRepository.php

@ -40,31 +40,6 @@ class UserRepository extends EntityRepository implements UserProviderInterface
return $q->execute(); return $q->execute();
} }
/**
* @param string $keyword
* @return mixed
*/
public function searchUserByKeyword($keyword)
{
$qb = $this->createQueryBuilder('a');
//Selecting user info
$qb->select('DISTINCT b');
$qb->from('Entity\User', 'b');
//Selecting courses for users
//$qb->innerJoin('u.courses', 'c');
//@todo check app settings
$qb->add('orderBy', 'b.firstname ASC');
$qb->where('b.firstname LIKE :keyword OR b.lastname LIKE :keyword ');
$qb->setParameter('keyword', "%$keyword%");
$q = $qb->getQuery();
return $q->execute();
}
/** /**
* @param string $username * @param string $username
* @return mixed * @return mixed

Loading…
Cancel
Save