• Resolved paulsbexley

    (@paulsbexley)


    This plugin is really useful – thanks! – but we’ve run into an issue.

    We’ve granted our ‘Shop Manager’-level users the necessary permissions (manage_options) to enable them to access User Login History through their dashboard menu.

    This works fine and they can go in and see the user login history list, filter it with all the options at the top etc. – great!

    The problem comes if they click the Download CSV button. The page simply reloads, with no CSV file being generated.

    Do you have any idea why that specific functionality might not be available to Shop Manager users when they can do everything else in the plugin? Do you know if it requires any additional permissions to be granted to them, and if so which ones?

    Thanks very much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Faiyaz Alam

    (@faiyazalam)

    Just replace the code at LINE No. 190 in the file user-login-history/admin/class-faulh-admin.php with:

     if (!current_user_can('manage_options')) {
                    return;
                }

    Let me know if you still have any issue.

    Thread Starter paulsbexley

    (@paulsbexley)

    That’s worked perfectly, thank you so much Faiyaz!

    Hey Faiyaz!
    Thank you so much for this plugin, really useful.
    I’m going to try this fix, but I would like to have a final solution instead of change that line on every update. Do you think is there any other way to do this? Maybe there could be a role selector in the settings page to choose.

    Thank you.

    Plugin Author Faiyaz Alam

    (@faiyazalam)

    @scerrutti

    There is no need to provide such settings because the expected behaviour for this CSV is that if a user can see the listing table then he should also be able to export CSV.
    The listing page is for all those users who have permission of “manage_options”.
    It was a bug that the only admin users were able to export the CSV.
    I will take care of this bug in the upcoming version.

    Thanks:)

    Hi @faiyazalam,

    Thank you so much. You’re right, no need to add settings for this.
    Do you know (more or less) when are you going to push the new version?

    Have a nice week.

    Plugin Author Faiyaz Alam

    (@faiyazalam)

    @scerrutti
    Currently, I am working on premium version only.
    Hope I will publish the premium version in October or November 2019.

    I will inform you once I fix the bug in this free version.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘CSV export not working for non-Administrator users’ is closed to new replies.