User Levels for editing all listings

This topic contains 1 reply, has 2 voices, and was last updated by  Stiofan O’Connor 7 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #392762

    MC1171611
    Full Member
    Post count: 180

    Hi guys,

    Are any users other than Administrators given access to edit all GD listings? I have someone that I want to give full access to edit all GD listings, but I don’t necessarily want to give them access to the rest of the back-end. Is it all or nothing, or is there a User level less than Administrator that I can set for this person?

    Thanks!

    #392837

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hello,

    I recently added a filter that will allow you to do this but it is not released yet, you would need update this function geodir_listing_belong_to_current_user() or replace this whole file:
    https://github.com/GeoDirectory/geodirectory/blob/master/geodirectory-functions/post_functions.php#L2812

    Then you could allow it like this:

    
    
    add_filter('geodir_listing_belong_to_current_user','_allow_userx_to_edit',10,3);
    function _allow_userx_to_edit($result,$listing_id,$current_user_id){
        // allow user with ID 123 to edit any GD listing
        if($current_user_id && $current_user_id==123){
            $result = true;
        }
    
        return $result;
    }

    Thanks,

    Stiofan

Viewing 2 posts - 1 through 2 (of 2 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount