- if (EXT_IS_ACTIVE('autopurge')) {
- // Use last online stamp only when autopurge for inactive members is activated
- if (getConfig('ap_inactive_since') > 0) {
- // Okay, include last online timestamp
- $whereStatement1 = sprintf("WHERE `status`='CONFIRMED' AND `last_online` >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
- $whereStatement2 = getConfig('bonus_ranks');
- } // END - if
+ if ((isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
+ // Okay, include last online timestamp
+ $whereStatement .= ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';