Support » Plugin: Mail Bank - #1 Mail SMTP Plugin for WordPress » “Error” in the querystring causes redirect to configuration page

  • Resolved MembeeDev

    (@membeedev)


    The code below handles oauth integration. If error exists in the querystring, the plugin always redirects to admin.php?page=mb_email_configuration. This causes a problem for us as other integrations may return “error” to the site that have nothing to do with oauth or the mail bank plugin. This causes great confusion for our users.

    Is it possible to implement a check for someone to be logged in as an admin in order to get redirected to admin.php? This would solve our issue. Or, if you have a different suggestion that would only redirect when appropriate, that would be great. Thanks.

    /*
    Function Name: oauth_handling_mail_bank
    Parameters: No
    Description: This function is used to Manage Redirect.
    Created On: 11-08-2016 11:53
    Created By: Tech Banker Team
    */

    if(!function_exists(“oauth_handling_mail_bank”))
    {
    function oauth_handling_mail_bank()
    {

    if(isset($_REQUEST[“code”]))
    {
    if(file_exists(MAIL_BANK_DIR_PATH.”lib/callback.php”))
    {
    include_once MAIL_BANK_DIR_PATH.”lib/callback.php”;
    }
    }
    elseif(isset($_REQUEST[“error”]))
    {
    $url = admin_url(“admin.php?page=mb_email_configuration”);
    header(“location: $url”);
    }
    }

    }

    • This topic was modified 7 years, 4 months ago by MembeeDev.
Viewing 1 replies (of 1 total)
  • Plugin Author Varun Sharma

    (@contact-banker)

    Hi,

    Please try version 2.0.8

    We have made a change in the condition and it should be working fine for you now.

    Please test and let us know.

    Thanks

    Support Team
    Tech Banker

Viewing 1 replies (of 1 total)
  • The topic ‘“Error” in the querystring causes redirect to configuration page’ is closed to new replies.