Member
Member
zero_day   29-11-2009, 18:44
#1

Hello,

i have to register admin-users without zenphoto formular.
Therefore i need the hash function. I found it in lib_auth.php, but i've no idea. how can i use this function to crypt my cleartext-password like '123456' in zenphoto password format? if i include the function an the classes.php (requiered), php show me the report: "Fatal error: Call to undefined function: getoption() in C:\Programme\xampp\htdocs\lib-auth.php on line 75"

i used the search function of this forum, but i found nothing, only that Currently it do a hash on the UserID+Password.

PS: Sorry for my bad english ^^

Administrator
Administrator
acrylian   29-11-2009, 18:52
#2

You can make your own form by customizing the lib-auth.php. Generally we don't recommend to hack core files because of update problems.

Why don't you want to use the form we provide?

Member
Member
zero_day   29-11-2009, 19:01
#3

because it's for my cms. with the register on the mainpage,user shall registered on the gallery. therefore i will update the database from zenphoto with my reg-formular. (i don't make a update from the gallery, because problems are indifferent^^) But i don't abolutly not how i can cutomizing the lib-auth.php ...

Administrator
Administrator
acrylian   29-11-2009, 19:24
#4

Ok, so a kind of single login. I suggest to take a look at these extensions, there are some single login scripts, some older and for Wordpress, that might give you some ideas:
http://www.zenphoto.org/tag/login/

Also probably of interesst:
http://www.zenphoto.org/2008/07/an-overview-of-zenphoto-users/

Out of curiosity what CMS do you use?

Member
Member
zero_day   29-11-2009, 20:19
#5

My own cms I've readed http://www.zenphoto.org/tag/login/ but there is no function for hash Oo

One question: To understand the hash is created, md5 from password+userID or...?

Thank you for help

Administrator
Administrator
acrylian   29-11-2009, 20:25
#6

There is passwordHash($user, $pass) within lib-auth.php and that uses md5 as you already noted. IF you want to use Zenphoto functions outside of Zenphoto you need to try the "zenphoto as a plugin" way on our user guide.

Member
Member
zero_day   29-11-2009, 21:02
#7

sorry but it works not realy maybe i'm a fool but i must ask again...
now i have the following code, but i see only a white page -.-

i defined the plugins and included the lib-auth and classes.php ... the file "test" is in zenphoto/zp-core/

Member
Member
sbillard   30-11-2009, 02:36
#8

Please be a little more specific on what you need to do. If you just want a single login of your CMS users you can just define the users both to the CMS and to Zenphoto using the same password. Then use the single logon suggestions above.

If you want to integrate your CMS login management with Zenphoto you need to create a custom version of the lib-auth.php that manages the users based on your CMS user database. The instructions for what you must provide are part of the lib-auth.php script.

There is really no reason for you to be hashing the Zenphoto passwords yourself. That will do you no good.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.