mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
PHRAS-3223 Admin - user details - display AuthFailure and Authprovider info (#4002)
PHRAS-3223 * add auth failure tab * auth provider list * api oauth code list * fix limit * delete modificaiton date * add mail locked only filter * add badge on api list
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
namespace Alchemy\Phrasea\Model\Repositories;
|
||||
|
||||
use Alchemy\Phrasea\Model\Entities\ApiAccount;
|
||||
use Alchemy\Phrasea\Model\Entities\User;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\Query\Expr;
|
||||
|
||||
/**
|
||||
* ApiOauthCodeRepository
|
||||
@@ -21,4 +23,15 @@ class ApiOauthCodeRepository extends EntityRepository
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
|
||||
public function findByUserAccount(User $user, $limit = 50)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('c');
|
||||
$qb->innerJoin('c.account', 'acc', Expr\Join::WITH, $qb->expr()->eq('acc.user', ':user'));
|
||||
$qb->setMaxResults($limit)
|
||||
->orderBy('c.created', 'DESC');
|
||||
$qb->setParameter(':user', $user);
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user