mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 20:43:25 +00:00
27 lines
568 B
PHP
27 lines
568 B
PHP
<?php
|
|
|
|
namespace Repositories;
|
|
|
|
use Doctrine\ORM\EntityRepository;
|
|
|
|
/**
|
|
* SessionRepository
|
|
*
|
|
* This class was generated by the Doctrine ORM. Add your own custom
|
|
* repository methods below.
|
|
*/
|
|
class SessionRepository extends EntityRepository
|
|
{
|
|
public function findByUser(\User_Adapter $user)
|
|
{
|
|
$dql = 'SELECT s
|
|
FROM Entities\Session s
|
|
WHERE s.usr_id = :usr_id';
|
|
|
|
$query = $this->_em->createQuery($dql);
|
|
$query->setParameters(array('usr_id' => $user->get_id()));
|
|
|
|
return $query->getResult();
|
|
}
|
|
}
|