News:

Wondering if this will always be free?  See why free is better.

Main Menu

Automatic Login from HTTP Authentication

Started by hiennhan12, September 16, 2018, 11:17:50 PM

Previous topic - Next topic

hiennhan12

I would like to implement an automatic login feature for our forums on a local intranet. The username would be taken from $_SERVER['REMOTE_USER'] and then logged in automatically using whatever password was in the database. If the username was not in the database, then it would be created with a random password.

I am using simple machines 1.1.11. I haven't seen anything like this, so I'm wondering if LogInOut.php is the place to make the modifications, or if I should use some of the integration hooks that I have seen people mention.

Any help is appreciated. Thanks.

vbgamer45

This part would be some what odd "If the username was not in the database, then it would be created with a random password. "  how would they ever get the password to the account without an email provided.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kindred

Additionally, 1.1.x is at end of life. Very little, if any support is being given to it, it has not received several security updates and it will not work on modern versions of php.


So, if you are planning any development, you should be using 2.0.15 at least.
Additionally, passing username with automatic login as $_SERVER['REMOTE_USER'] is insecure to an extreme....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: