Bug causes timeout when accessing user list in multisite
-
We have a multisite environment with 160 active subsites and nearly 700 users. When admins attempt to access /wp-admin/users.php, the page will time out with “500 Internal Server Error | nginx”. I’ve isolated the problem to the code on lines 189-200 in /modules/login-security/classes/controller/users.php:
public function can_activate_2fa($user) {
if (is_multisite() && !is_super_admin($user->ID)) {
$blogs = get_blogs_of_user($user->ID);
foreach ($blogs as $id => $info) {
if ($this->_user_can_for_blog($user, $id, Controller_Permissions::CAP_ACTIVATE_2FA_SELF)) {
return true;
}
}
return false;
}
return user_can($user, Controller_Permissions::CAP_ACTIVATE_2FA_SELF);
}It appears to test every user and iterate over every subsite. The problem went away when I commented out the “if” statement. It would be best if there was a way to circumvent this code in the settings.
Mark Pemburn
Web Application Administrator
Clark University
The topic ‘Bug causes timeout when accessing user list in multisite’ is closed to new replies.