I wanted to somehow indicate in the user list which users I'd banned, but I didn't want to add another column to show it. So I added a little bit of code to strike-through the UID and the email address of banned users. This requires two small changes:
In
public_html/admin/user.php, around line 295, we need to add the 'status' to the sql statement:
$sql = "SELECT {$_TABLES['users']}.uid,username,fullname,email,photo
,status,regdate$select_userinfo FROM {$_TABLES['users']} $join_userinfo WHERE 1";
Then in
geeklog/system/lib-admin.php, in the function
ADMIN_getListField_users, add this [around line 610]:
case "uid":
case "email":
if ( $A['status'] == 0 )
$retval = '<s>' . $fieldvalue . '</s>';
else
$retval = $fieldvalue;
break;
before this:
default:
$retval = $fieldvalue;
break;
Voila!
- Andy
Errr... un-voila.
Some other places use this code, so we need to check if the status has been retrieved. So the code in ADMIN_getListField_users should be this:
if ( isset( $A['status'] ) && $A['status'] == 0 )
instead of this:
if ( $A['status'] == 0 )
- Andy