]> git.mxchange.org Git - friendica-addons.git/blobdiff - notifyall/notifyall.php
Merge pull request #485 from annando/xmpp-auto-auth
[friendica-addons.git] / notifyall / notifyall.php
index 2f47838f78fad90fdd21da248a307f3aac5d5943..594a7540d90f28942f18833efa421b3b6ca0ca51 100644 (file)
@@ -9,7 +9,7 @@
  * Author: Rabuzarus <https://friendica.kommune4.de/profile/rabuzarus> (Port to Friendica)
  */
 
-require_once('include/Emailer.php');
+use Friendica\Util\Emailer;
 
 function notifyall_install() {
        logger("installed notifyall");
@@ -63,7 +63,7 @@ function notifyall_post(&$a) {
        }
        $sql_extra = ((intval($_REQUEST['test'])) ? sprintf(" AND `email` in ( %s )", $email) : '');
 
-       $recips = q("SELECT `email` FROM `user` WHERE `verified` AND NOT `account_removed` AND NOT `account_expired` $sql_extra");
+       $recips = q("SELECT DISTINCT `email` FROM `user` WHERE `verified` AND NOT `account_removed` AND NOT `account_expired` $sql_extra");
 
        if(! $recips) {
                notice( t('No recipients found.') . EOL);