UBB.Dev
open /cache_builders/new_users.php

replace query:
Code

$query = "
select USER_DISPLAY_NAME,USER_ID
from {$config['TABLE_PREFIX']}USERS
where USER_IS_APPROVED='yes'
and USER_ID <> '1'
order by USER_ID desc limit 5
";

with

Code
$query = "
select USER_DISPLAY_NAME,USER_ID
from {$config['TABLE_PREFIX']}USERS
where USER_IS_APPROVED = 'yes'
and USER_IS_BANNED = 0
and USER_ID <> '1'
order by USER_ID desc limit 5
";

No sense in giving somebody a topspot on the screen if they are banned anyway.
Muchas gracias thumbsup
Thanks blaaskaak smile

This section also needs colouring at some stage wink
Originally Posted by Ian_W
This section also needs colouring at some stage wink


That shouldn't be so difficult.

That wasn't so difficult:

Just after
Code
list($total) = $dbh->fetch_array($sth);

until

Code
	$users[$i]['name'] = $uname;

in /cache_builders/new_users.php

Keep both lines of code above, and replace everything inbetween with the following code:

Code
$query = "
select t1.USER_DISPLAY_NAME,t1.USER_ID,t2.USER_NAME_COLOR,t1.USER_MEMBERSHIP_LEVEL
from {$config['TABLE_PREFIX']}USERS as t1,
{$config['TABLE_PREFIX']}USER_PROFILE as t2
where t1.USER_IS_APPROVED = 'yes'
and t1.USER_IS_BANNED = 0
and t1.USER_ID <> '1'
and t1.USER_ID = t2.USER_ID
order by USER_ID desc limit 5
";
$sth = $dbh->do_query($query);
$users = array();
$i=0;
while(list($uname,$uid,$Color,$PostStatus) = $dbh->fetch_array($sth)) {
$uname = $html->user_color($uname, $Color, $PostStatus);

Just a matter of getting the usercolor and their membership status, and feeding those through the colorize function.
Thanks smile

Is this for 7.3 as I thought order by USER_ID desc limit 5 was no longer in there, as the limit of users displayed was controlled from the CP?

(I haven't looked at that bit of code for a while, so might be mistaken)
Just had a check, and it definitely is 7.3 code. The 5 is hardcoded.
I'm sorry - got confused over the online list.
© UBB.Developers