MyBB Community Forums

Full Version: [F] Bug in setting oldgroup in task (expire bans)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB 1.4.1.
I have found possible bug while reviewing code - I did not test it however.

File: inc/tasks/usercleanup.php, code:
PHP Code:
    // Expire bans
    
$query $db->simple_select("banned""*""lifted!=0 AND lifted<".TIME_NOW);
    while(
$ban $db->fetch_array($query))
    {
        
$updated_user = array(
            
"usergroup" => $ban['oldgroup'],
            
"additionalgroups" => $ban['oldadditionalgroups'],
            
"displaygroup" => $ban['displaygroup']
        );
        
$db->update_query("users"$updated_user"uid='{$ban['uid']}'");
        
$db->delete_query("banned""uid='{$ban['uid']}'");
    } 

This line:
PHP Code:
"displaygroup" => $ban['displaygroup'

should be:
PHP Code:
"displaygroup" => $ban['olddisplaygroup'
?
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.
Reference URL's