• Resolved cerice

    (@cerice)


    Hello,

    In wordpress multisite with 15000 users the function username_list in Helpers.php make php timeout.
    I replace de script :

    return array_reduce($rul_userresults, function ($carry, $item) {
    
                $carry[$item[0]] = $item[0];
    
                return $carry;
            });

    by :

    $out=array();
            foreach($rul_userresults as $i) {
                $out[$i[0]]=$i[0];
            }
            return $out;

    and it’s work fine, maybe the array_reduce is to heavy !!!

Viewing 1 replies (of 1 total)
  • Thank you, @cerice, for the code recommendation.

    We are actually working on a more improved way where searches for users are done over Ajax.

    Before that will go live, we will in the meantime implement your code in the next update.

Viewing 1 replies (of 1 total)
  • The topic ‘PHP timeout in function username_list’ is closed to new replies.