I'm setting up a "Favorites" function where people can save images as their "favorite". To do this, I need to pull a user variable (either username or id) in the image template. (This would obviously only pull if someone was logged in.) Is there a way to do this? Thanks! I tried various different variables from elsewhere in the script, but none of them seemed to work.
Comments
I should also mention that if the current user is not logged in, `$_zp_current_admin_obj` will be `null` (if I remember correctly).
With Zenphoto 1.2.9 and previous there is a global array named`$_zp_current_admin`. There are indices for `id` and for `user` so you could get either to put in the template but I would recommend against the `id` and for the `user` element.
However, once Zenphoto 1.3 is released, this variable will no longer exist as we are moving user references to an object model. With Zenphoto 1.3 you would have to change your theme to use the object method `$_zp_durrent_admin_obj->getUser()`.