I attached my modified version with the workaround for the upper and lower case problem. It should work but isn't fully tested. So you may want to backup your user before trying it. Let me know if any problems occur.
@Dave_L yes, that was the way i did it. Yes, ereg_replace would be better code. Also it doesn't matter here, because the usernames are case insensitive.
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.