Managing user for private gallery

Hi,

I am working a a zp private gallery and preparing migration from gallery2. I have some questions.

Q1: I need to create 80 users... Is there a way to create zp users by bulk?
Q2: I would like to send an invitation email for these new users. email-newuser plugin sends a link which requires an active user account http://domain.com/zp-core/admin-users.php?ticket=bf47e5cd193c7f6185657ce375f7028645ec4e720df7f14c28267fc8f6a7&user=NameOfUser. I do not understand the process of this. It seems that it is a backend admin access... is it normal?
Q3: Is there a way to deactivate the ZP bar at the top by overlay for a group of user or for all logged users?

Thanks!

Comments

  • acrylian Administrator, Developer

    Q1: I need to create 80 users... Is there a way to create zp users by bulk?

    There is nothing ready made. You could create something using the Zenphoto_Administrator class: https://docs.zenphoto.org/1.5.x/class-Zenphoto_Administrator.html

    Q2: I do not understand the process of this. It seems that it is a backend admin access... is it normal?

    Yes, the point of the plugin is to send a notification to the user to change the password which naturally require access to their user account (you can disable that access but it is not recommended especially for the GDPR). The user account naturally is on the backend. How much acccess they have depends on the rights you assign to them.

    Q3: Is there a way to deactivate the ZP bar at the top by overlay for a group of user or for all logged users?

    That bar is called the admintoolbox btw ;-). What user

    You can disable it by using this in your theme's functions.php:

    zp_remove_filter('theme_body_close', 'adminToolBox')
    

    If you want specific users not to see it you have to add a check like:

     if (!is_null($_zp_current_admin_obj) && $_zp_current_admin_obj->getUser() == 'a-userid-to-allow') { … } 
    

    Or by checking their general rights level by using something like

     if(zp_loggedin(<Here add  the constant for hte rights level>)) { … }. 
    

    Please see the related user guide article for the constant names.

  • Thanks @acrylian!

    zp_remove_filter('theme_body_close','adminToolbox',9999);
    

    does not work in my theme's functions.php.

    I have in my theme footer just before my tag,

    <?php zp_apply_filter('theme_body_close'); ?>
    

    I have tested with priorities, clear html cache etc... adminToolbox is still there. Any ideas to debug? Is there a specific order/place to publish the function zp_remove_filter() in functions.php?

  • acrylian Administrator, Developer

    I just tried with the include Zenpage theme and removing the filter using zp_remove_filter('theme_body_close','adminToolbox'); does work as expected for me. Actually setting the priority here is not necessary. I would really not know why this should not work.

    The order when you call it is not necessary actually as functions.php is loaded before theme pages are. But right at the beginning is a good place for every kind of filter action.

    Also force clear your browser cache, perhaps even several times. It is very persistent these times in every browser.

    For debugging you could set the definition of the constant DEBUG_FILTERS to true within zp-core/global-definitions.php.

  • Thanks, it is working good, it was effectively a cache issue ;-)

Sign In or Register to comment.