Author Topic: update database from .htpasswd  (Read 3850 times)

0 Members and 1 Guest are viewing this topic.

Offline 4dabdura

  • Pre-Newbie
  • Posts: 6
    • View Profile
update database from .htpasswd
« on: May 03, 2009, 10:36:01 PM »
Hello
I kindly want to ask great coders here for simple script, I know I shouldn't be posting here because what I want is less related to 4images but I wasn't able to get attention from ignorant people on other forums, I've spent yesterday searching for such script with no luck, I dare to ask because i'm sure it's very simple for pros, ok to the subject now.

I have .htpasswd file which is constantly updated by another script with:
user:pass <--pass can be either encrypted or decrypted
I want a simple php code that compares .htpasswd username:password against 4images mysql database username:password and updates mysql database accordingly (removes deleted users, adds new users)

desperately need help
thanks in advance


Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: update database from .htpasswd
« Reply #1 on: May 03, 2009, 10:49:00 PM »
What about other user info such as email address and user preferences?

[EDIT]
Also, unless password is not encrypted or encrypted in MD5 it won't work at all.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline 4dabdura

  • Pre-Newbie
  • Posts: 6
    • View Profile
Re: update database from .htpasswd
« Reply #2 on: May 03, 2009, 11:06:38 PM »
just username:password and setting user_level to 2 so they're able to login to 4images
I removed md5 word 2 times from includes/sessions.php and 4images now works with plain text passwords
« Last Edit: May 04, 2009, 07:38:10 PM by 4dabdura »