Unfortunately, randprofilepal.php still seems to be selecting invalid user IDs with that code. I had tried something similar before doing another database call, but had no luck.
The problem seems to be caused because we are depending on the value returned by $palShowregs. This number is the number of users in the database, but that does not necessarily correspond with the U_Number for each user (at least in 5.5.1.. Not sure about 6.0).
For example: It is possible in 5.5.1 (if you delete a lot of users) to have 4 users in your database with the numbers: 1, 5, 8, 10. Now $palShowregs will tell you that you have 4 registered users, and that is correct, but if you tell randprofilepal.php to display a $RandNum between 1-4, you will only cover one of those user IDs.
I have noticed a similar problem (I think it is similar at least ) with pollpal.php. If you delete a poll, pollpal.php will still try to call it. However, because there is no data for the poll, it will just display the text: Out of "".
I believe the pollpal.php problem can be fixed by simply modifying the select statement to make sure that certain rows are not null. I haven't played with it yet though.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.