On our system, we use http authentication to restrict Wiki access. You must be a valid system user to be allowed to access the Wiki. Since we did not want to then have to log in to the Wiki to set a user name, I wrote this patch to use the REMOTE_USER login, and retrieve the corresponding system user from that. The Wiki uid is the system uid + 5000.

This seems to work fine, but any suggestions on improvements are welcome. I am not sure whether preferences work properly without setting a password manually.