• So. first some background info:

    I’ve made a plugin baste on an MVC architecture.
    In this plugin you can register users.
    A user need to activate their account.

    Problem:
    When one clicks on the link from the email that the user recieve they get to the correct page, get no php errors. But the account is allready activated.
    That is everything works exactly like the page is first run through but no output, then run through again and it is displayed to the user.

    I have through var_dump, echo and print_r() determined that the account is activated before my plugin is even initialized, so its not a problem in my code..

    Codeflow:

    pluginroot:
    $controller = new Controller()

    controller hooks $controller->load() to wp_loaded

    load() runs $get_handler->handle($_GET)
    where $get_handler is instanced in $controller->__construct()

    the handler activates $get_handler->activate() when $_GET['activation_key'] is set and not empty string

    But as far as i can see this code is run twice, but with totally separate output. (get 2 messages, first saying the account is activated, the second saying that the account is already activated)

    Is this how wordpress always does it? Is there a work around?

  • The topic ‘WordPress running an invisible extra time.’ is closed to new replies.