• Resolved emar5x5

    (@emar5x5)


    Hi there,

    I’ve got a bit of a suggestion that I would like to give. Recently I encountered an issue with WP Ultimate CSV Importer. I’m logged in as an administrator but I can’t access the importer and an error message would show that says “Sorry, you are not allowed to access this page”. After checking the plugin code I found out that it checks whether the user is logged in and its role in index 0 is administrator. Upon checking with my admin roles; the user role did not start on 0 rather it started on index 12 https://prnt.sc/tXcXZ8jCpO1W.
    My suggestion is that, on line 109 and 493 of file wp-ultimate-csv-importer.php, instead of using this line;
    if(!empty($role) && !empty($role[0]==’administrator’)){
    can you change it to like this below ?
    if(!empty($role) && !empty( in_array( ‘administrator’ , $role ) )){

    Cheers

    • This topic was modified 3 years ago by emar5x5.
Viewing 1 replies (of 1 total)
  • smacksupport

    (@smacksupport)

    Hi @emar5x5 , we have fixed this in the upcoming version and will release it soon. Thank you for your valuable comment.

Viewing 1 replies (of 1 total)

The topic ‘Code Change Suggestion’ is closed to new replies.