1 (edited by kaptainkory 2008-12-31 20:15)

Topic: Integration of PunBB and ZenPhoto - Help Request

I'm quite new to PunBB, so I just want to make sure I'm on the right track...

I am looking to synchronize my users of PunBB with ZenPhoto, a picture gallery program.  I first looked at this from the ZenPhoto side and was faced with heavy modifications of core files!  Yuck!  I think with PunBB's hook/extension system, I can accomplish 90% of what I'm after...

Specifically, I would like my extension to do the following:

* Upon PunBB register, add the user to the ZenPhoto database with certain default rights (can upload files, etc.).

* Upon PunBB user deletion, remove the user from the ZenPhoto database.

* Upon PunBB login...

-> check if user is in ZenPhoto database and add if not.

-> update ZenPhoto user password (in case the password was changed by the user since last log in).

-> set additional cookie for ZenPhoto authentication.

-> set additional session for ZenPhoto authentication.

* Upon PunBB log out...

-> unset ZenPhoto cookie.

-> unset ZenPhoto session.


Those are the basics.  One caveat is that ZenPhoto uses a different password hashing (md5?), but I *think* it should be possible to run the user-supplied password through two separate hashes to deal with it?

If I could use include_once() in the extension to pull from ZenPhoto, I could even use their native functions to deal with the password hashing, cookies, and such.


Any suggestions, code snippets, or links are welcome!