Skip to content

Commit

Permalink
#2021 - Accounts pruning if there are no attached profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
romanlesnikov committed Mar 23, 2022
1 parent cf179a0 commit d557277
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions inc/classes/BxDolAccountQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,11 @@ public function getAccountsForPruning($sMode, $iAdded)
INNER JOIN `sys_profiles` ON `sys_accounts`.`id` = `sys_profiles`.`account_id`
WHERE `added` < :date_limit AND name <> 'Robot'
GROUP BY `sys_profiles`.`account_id`
HAVING COUNT(`sys_profiles`.`id`) = 1 ";
HAVING COUNT(`sys_profiles`.`id`) <= 1 ";
break;

case 'no_login':
$sQuery = "SELECT `sys_accounts`.`id` FROM `sys_accounts` WHERE `logged` < :date_limit AND `added` < :date_limit AND name <> 'Robot' ";
$sQuery = "SELECT `sys_accounts`.`id` FROM `sys_accounts` WHERE `logged` < :date_limit AND `added` < :date_limit AND name <> 'Robot' AND `sys_accounts`.`id` NOT IN (SELECT `user_id` FROM `sys_sessions`)";
break;

case 'no_confirm':
Expand Down
8 changes: 4 additions & 4 deletions modules/boonex/english/data/langs/system/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1528,10 +1528,10 @@
]]></string>

<string name="_adm_stg_cpt_option_value_sys_account_pruning_no"><![CDATA[No pruning]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_pruning_no_login_delete"><![CDATA[Delete accounts with no login for N days]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_pruning_no_login_suspend"><![CDATA[Suspend accounts with no login for N days]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_pruning_no_confirm_delete"><![CDATA[Delete accounts which didn't confirm email for N days]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_pruning_no_profile_delete"><![CDATA[Delete account which didn't created any profiles for N days]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_pruning_no_login_delete"><![CDATA[Delete accounts with no login within N days]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_pruning_no_login_suspend"><![CDATA[Suspend accounts with no login within N days]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_pruning_no_confirm_delete"><![CDATA[Delete accounts which didn't confirm email within N days]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_pruning_no_profile_delete"><![CDATA[Delete accounts which didn't created any profiles within N days]]></string>

<string name="_adm_stg_cpt_option_value_sys_account_reset_password_redirect_home"><![CDATA[Home page]]></string>
<string name="_adm_stg_cpt_option_value_sys_account_reset_password_redirect_profile"><![CDATA[View profile page]]></string>
Expand Down

0 comments on commit d557277

Please sign in to comment.