Member
Member
tunafish   2011-08-05, 13:02
#1

Are there some functions to get the owners email address from the currently active album?

I need to get the email address from an external page so:
`

require_once("../../zp-core/template-functions.php");

zp_load_album($_POST['album']);

function returnOwner() {

global $_zp_current_album;

$owner = $_zp_current_album->getOwner();

return $owner;

}

`

Now how can I get the email address?
I found something with $userobj->getEmail() but having difficulties creating the userobj.

Administrator
Administrator
acrylian   2011-08-05, 14:44
#2

http://www.zenphoto.org/documentation/classes/Zenphoto_Administrator.html

Btw, you might want to sanitize the POST value for your own security....

Member
Member
sbillard   2011-08-05, 15:54
#3

$userobj= $_zp_authority->getAnAdmin(array('user=' => $owner, 'valid=' => 1));

Note that there is no guarantee that such owner actually exists, so you may bet back NULL.

Member
Member
tunafish   2011-08-05, 16:52
#4

That's great. Thanks a lot acrylian :-)
ZP rocks!

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