I am trying to log a user in and then back out of NT using PHP and it's proving impossible. I could really use some help if anyone out there has done this. Right now I can pass the login and password using http://user: password@domain.com, but once the user has logged in as another user, I cannot return them to their real login without having them close the browser. Does anyone know how to do this?
The reason I want to is that we have a file upload tool on the intranet I'm building, and regular users do not have write permissions to the directories where they want to upload. We have handled that by granting anonymous acess to the file upload tool itself and setting the user for that tool up with write privileges. For some reason, when a user accesses the tool, even though they are now browsing anonymously (and therefore assuming the identity of the write-enabled anonymous user), the system still tries to write to the directories as if it were the individual who originally logged in in the first place.
Aha! We said, what if we pass the username and password in the url? Then the user would be logged an as the correct one. Well, that works great, except now that user is logged in as someone else with no way to return.
I hope this explains my dilemma. I am looking for either a better approach to the problem than the way we are doing it now, or a method one of you knows for logging the user back out and then in as themselves again without closing the browser entirely. Any help would be GREATLY appreciated.