Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
teraßyte Posted October 25, 2019 Posted October 25, 2019 I recall reading we should report bugs here now? Not 100% sure though... 🙄 Anyway, the task applications/core/tasks/clearincompletemembers.php is not properly cleaning up incomplete accounts for those who signed up with FB/Twitter/etc. We've noticed this issue for a while now, but today I had a better look at it and figured out the issue. The problem is caused by this code on line 54: foreach ( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_members', array( array( '(name=? OR email=?)', '', '' ), array( '! (members_bitoptions2 & 16384 ) AND joined<? AND (last_visit=0 OR last_visit IS NULL)', \IPS\DateTime::create()->sub( new \DateInterval( 'PT1H' ) )->getTimestamp() ) ) ), 'IPS\Member' ) as $incompleteMember ) The query fails to load any row because the check last_visit=0 fails since the column in the DB contains the value NULL instead. I changed that bit of code to account for both values and the task is working as it should now: (last_visit=0 OR last_visit IS NULL) Full code: foreach ( new \IPS\Patterns\ActiveRecordIterator( \IPS\Db::i()->select( '*', 'core_members', array( array( '(name=? OR email=?)', '', '' ), array( '! (members_bitoptions2 & 16384 ) AND joined<? AND (last_visit=0 OR last_visit IS NULL)', \IPS\DateTime::create()->sub( new \DateInterval( 'PT1H' ) )->getTimestamp() ) ) ), 'IPS\Member' ) as $incompleteMember )
bfarber Posted October 28, 2019 Posted October 28, 2019 Thanks, I've raised this internally to get resolved in a future release.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.