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
|
|
|
{
|
2021-11-19 15:13:20 +01:00
|
|
|
public function getMailAddresses() {
|
2022-04-28 16:25:34 +02:00
|
|
|
$users = $this->findBy(['sendmail' => 1]);
|
2021-11-19 15:13:20 +01:00
|
|
|
|
|
|
|
$return = [];
|
2022-04-28 16:25:34 +02:00
|
|
|
foreach($users as $user) {
|
|
|
|
$return[] = $user->getEmail();
|
2021-11-19 15:13:20 +01:00
|
|
|
}
|
|
|
|
return $return;
|
|
|
|
}
|
2021-04-08 12:54:49 +02:00
|
|
|
}
|