Skip to content

Commit

Permalink
Don’t prune protected accounts
Browse files Browse the repository at this point in the history
Fixes #21304
  • Loading branch information
vboctor committed Aug 27, 2016
1 parent a38a28f commit 8ac7f9c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manage_user_prune.php
Expand Up @@ -58,7 +58,8 @@
$t_days_old = (int)7 * SECONDS_PER_DAY;

$t_query = 'SELECT id, access_level FROM {user}
WHERE ( login_count = 0 ) AND ( date_created = last_visit ) AND ' . db_helper_compare_time( db_param(), '>', 'date_created', $t_days_old );
WHERE ( login_count = 0 ) AND ( date_created = last_visit ) AND ' .
'( protected = 0 ) AND ' . db_helper_compare_time( db_param(), '>', 'date_created', $t_days_old );
$t_result = db_query( $t_query, array( db_now() ) );

if( !$t_result ) {
Expand Down

0 comments on commit 8ac7f9c

Please sign in to comment.