then in that case, it might be easier to do the active X applet.
basically it will look up a value in the registry table. In the case, you might want to look up some value from HKEY_CURRENT_USER.
now the problem is singing this applet so that the client can be asked to run it.
if you're using DHCP, doesn't the dchp server store usernames? can you access that using a COM object (and load the COM from PHP)?
-sridhar