By darklight on
Hi there.
I have been working on this script for a while now, (on and off) and finally got it finished. I have a pretty big problem though. Although the script itself works like a dream, it cannot be viewed by anyone other than the SuperAdministrator.
I use this in a Block with the PHP Filter. Can anyone shed a little light to help me get it released?
$count = 16;
$result = db_query_range(db_rewrite_sql("SELECT * FROM {users} ORDER BY login DESC"), 0, $count);
while ($user_info = db_fetch_object($result)) {
if($user_info->uid && $user_info->picture){
print '<div class="active_users"><a href="profile/'.strtolower($user_info->name).'"><img src="/'.$user_info->picture.'" title="'.$user_info->name.'"></a></div>';
} elseif($user_info->uid && !$user_info->picture){
print '<div class="active_users"><a href="profile/'.strtolower($user_info->name).'"><img src="/sites/default/files/pictures/default.png" title="'.$user_info->name.'"></a></div>';
}
}
I'm guessing it's a permission issue with the query, but even so, I don't see how that is possible.
Thanks for any help offered.