[b]Tutorial: WordPress and ZenPhoto login integration[/b]
[i]If you log into WordPress successfully, then the changes below will automatically log you into ZenPhoto...[/i]
Add the following to wp-login.php (wordpress base directory) at the very begining of the file:
`require_once("zenphoto/zen/functions-db.php");
require_once("zenphoto/zen/auth_zp.php");`
before this line:
`require( dirname(__FILE__) . '/wp-config.php' );`
then go to around line 195, which reads `do_action('wp_login', $user_login);` and replace with the following:
`do_action('wp_login', $user_login);
setcookie("zenphoto_auth", sha1(admin.password), time()+5184000, WEBPATH);
$_zp_loggedin = true;
wp_redirect($redirect_to);
exit();`
Obviously the set cookie function needs you to input your username and password for ZenPhoto (unless of course you keep them at admin and password respectively)