Remove join profile table and remove exclude forums
$userStmt = DBA::p("SELECT `user`.`uid`, `user`.`login_date`, `contact`.`last-item`
FROM `user`
- INNER JOIN `profile` ON `profile`.`uid` = `user`.`uid`
INNER JOIN `contact` ON `contact`.`uid` = `user`.`uid` AND `contact`.`self`
WHERE `user`.`verified`
AND `user`.`login_date` > ?
- AND `user`.`account-type` != ?
AND NOT `user`.`blocked`
AND NOT `user`.`account_removed`
AND NOT `user`.`account_expired`",
- DBA::NULL_DATETIME,
- self::ACCOUNT_TYPE_COMMUNITY
+ DBA::NULL_DATETIME
);
if (!DBA::isResult($userStmt)) {