mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 12:33:26 +00:00
Fix #1594 : Removed users are not disconnected
This commit is contained in:
@@ -12,4 +12,15 @@ use Doctrine\ORM\EntityRepository;
|
||||
*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user