]> git.mxchange.org Git - friendica.git/blobdiff - mod/pubsub.php
ping returns notices and infos also to unlogged users
[friendica.git] / mod / pubsub.php
index 4dff5d531ab27a9450ebe2b37c6c37a7645ad0e1..b2f0069271277d76fa334a9f8fdc1d3f6809f891 100644 (file)
@@ -44,7 +44,7 @@ function pubsub_init(&$a) {
 
                $subscribe = (($hub_mode === 'subscribe') ? 1 : 0);
 
-               $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
+               $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `account_expired` = 0 LIMIT 1",
                        dbesc($nick)
                );
                if(! count($r))
@@ -99,7 +99,7 @@ function pubsub_post(&$a) {
        $nick       = (($a->argc > 1) ? notags(trim($a->argv[1])) : '');
        $contact_id = (($a->argc > 2) ? intval($a->argv[2])       : 0 );
 
-       $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' LIMIT 1",
+       $r = q("SELECT * FROM `user` WHERE `nickname` = '%s' AND `account_expired` = 0 LIMIT 1",
                dbesc($nick)
        );
        if(! count($r))