| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public static function clearExpiredConfirmations(): void |
||
| 10 | { |
||
| 11 | $qb = Registry::get('em')->createQueryBuilder(); |
||
| 12 | $qb->delete('RssApp:User', 'u') |
||
| 13 | ->where('u.lastLogin IS NULL') |
||
| 14 | ->andWhere('u.created < :oneDayAgo') |
||
| 15 | ->andWhere('u.accessLevel = 0') |
||
| 16 | ->setParameter(':oneDayAgo', new DateTime('-1 month')) |
||
| 17 | ->getQuery() |
||
| 18 | ->getResult(); |
||
| 19 | } |
||
| 21 |