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 ^^
Comments
Why don't you want to use the form we provide?
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?
One question: To understand the hash is created, md5 from password+userID or...?
Thank you for help
now i have the following code, but i see only a white page -.-
<?php
define('ZENFOLDER', 'zp-core');
define('WEBPATH', 'zenphoto');
require_once("template-functions.php");
//load extensions
$_zp_plugin_scripts = array();
$_zp_flash_player = NULL;
$curdir = getcwd();
chdir("plugins/");
$filelist = safe_glob('*'.'php');
chdir($curdir);
foreach ($filelist as $extension) {
$opt = 'zp_plugin_'.substr($extension, 0, strlen($extension)-4);
if (getOption($opt)) {
require_once("plugins" . $extension);
}
}
include'classes.php';
include'lib-auth.php';
$user='test';
$pass='test';
$pw= passwordHash($user, $pass);
echo $pw;
?>
i defined the plugins and included the lib-auth and classes.php ... the file "test" is in zenphoto/zp-core/
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.