• Resolved sba7elfol

    (@sba7elfol)


    Only when an account that does not have admin or super admin permissions (in my case, role: editor with capability to add and edit users using User Role Editor), I get this error:
    Fatal error: Call to a member function getCallbackDomainLabel() on a non-object in /Sites/wp-content/plugins/postman-smtp/Postman/PostmanAdminController.php on line 376

    When trying to access the user-new.php from one of my subsites (subfolder)

    I had to comment all the lines from 376 to 394 to get past it.
    P.S. I use plain authentication.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Jason Hendriks

    (@jasonhendriks)

    A bug! I assume you are running current version v1.6.24? Would you please downgrade to v1.6.23 and let me know if the issue persists?

    Thread Starter sba7elfol

    (@sba7elfol)

    I made an edit up there to give you more info. And yes, I am running the latest version 1.6.24. I’ll see.

    Thread Starter sba7elfol

    (@sba7elfol)

    tried 1.6.23. Still give an error.

    edit: But 1.6.22 works fine ??

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    Ah. Thanks for the edit. That will help me narrow it down! I appreciate your report.

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    I can’t reproduce this error.

    On a multisite install I:

    • installed User Role Editor
    • Installed and configured Postman 1.6.24
    • modified the Editor role (your posted roles were insufficient to show the link; I also had to check list_users and promote_users)
    • assigned a new user as Editor and went to the Users > Add New page

    Nothing. Everything works as expected. Except the warning “WordPress is still handling email delivery, not Postman. Configure the plugin.” appeared when it shouldn’t have. That’s for admins only.

    I also tried non-multisite. And I also tried with Postman unconfigured. Have I missed a step?

    However, I can see a potential problem, even though I can’t reproduce one here. In Postman.php:

    // load the administration screens
    if (is_admin ()) {
    	// the is_admin check only tells us that we are not on the public pages
    	$this->setup_admin ();
    }

    That’s wrong. I should be checking for the administrator role there as well as checking is_admin(). I’ll find a fix and let you know.

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    Ya, I found the issue. In PostmanAdminController I do have the administrator role check:

    public function registerHooks() {
    	// only administrators should be able to trigger this
    	if (PostmanUtils::isAdmin ()) {

    Except by here it’s too late. The editor is already inside the AdminController. Should be easy to fix.

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    I’m really confused how you triggered this as your Editor should not have been able to enter the block on line 376 because of the PostmanUtils::isAdmin() check in initializeAdminPage().

    Apparently they passed that check, which means they have an administrator capability, and they would have passed the same check in registerHooks() and then $this->oauthScribe would not have been null.

    So really scratching my head here ??

    I added a custom capability for Postman, in case the failure is in current_user_can ($role). The codex says it’s okay but maybe it’s not. Would you install v1.6.25c and see if the changes I made fix it?

    Also, do me a favour and make this topic title a little more specific? Thanks!

    Plugin Author Jason Hendriks

    (@jasonhendriks)

    v1.7 makes the fix official – hope it solves your problem.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Error’ is closed to new replies.