webcron/src/Repository/UserRepository.php

21 lines
378 B
PHP
Raw Normal View History

2021-04-08 12:54:49 +02:00
<?php
2022-04-27 14:24:48 +02:00
namespace App\Repository;
2021-04-08 12:54:49 +02:00
2022-04-27 14:24:48 +02:00
use App\Service\Secret;
use Doctrine\ORM\EntityRepository;
2021-04-08 12:54:49 +02:00
2022-04-27 14:24:48 +02:00
class UserRepository extends EntityRepository
2021-04-08 12:54:49 +02:00
{
public function getMailAddresses() {
2022-04-28 16:25:34 +02:00
$users = $this->findBy(['sendmail' => 1]);
$return = [];
2022-04-28 16:25:34 +02:00
foreach($users as $user) {
$return[] = $user->getEmail();
}
return $return;
}
2021-04-08 12:54:49 +02:00
}