Support » Plugin: Gravity Forms Directory » Admin Override to View All Entries

Viewing 2 replies - 1 through 2 (of 2 total)
  • I found a way to get this working. I was able to give access to all entries for users with a specific permission. Although, it seems to have created a separate issue: Sometimes, entries disappear from view for regular users.

    Anyhow, here’s what I did. Edit wp-content/plugins/gravity-forms-addons/gravity-forms-addons.php

    At line 1917, add
    if(self::has_access(“gravityforms_export_entries”)) { return $leads; }
    just below
    if(empty($settings[‘limituser’])) { return $leads; }

    in this instance, I specified gravityforms_export_entries as the capability that determines if the user is an “admin” or has permission to view all entries.

    Then, at line 2121, change

    $user_filter = $wpdb->prepare(” AND created_by=%d “, $current_user->ID);
    $user_filter = $wpdb->prepare(” AND (created_by IS NULL OR l.created_by=%d)”, $current_user->ID);

    Like I said, this created another issue that I’m trying to work around, but hey, it’s progress! If someone else wants to help develop this further, that’d be great!

    Update: this modification only shows entries the user with special capabilities is the creator for along with all the entries that have no creator (NULL).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Admin Override to View All Entries’ is closed to new replies.