[resolved] Login form problem with wp_signon() (2 posts)

  1. joschi81
    Posted 4 years ago #

    Hi there,

    I'm writing a plugin that includes customized login and register forms. The forms will be integrated in a normal page, the "naked" standard login page of WP must not appear at any time...

    Now I've got the problem that of course there's already some HTML output before this line:

    $user = wp_signon('', $secure_cookie);

    And of course this produces the well known 'headers already sent' error message. As I'm not much used to hooks and filters, I have no idea right now how I can make the wp_signon() function being called before any output has started from within the function inside my plugin php file.

    So, what could be a solution for this?


  2. joschi81
    Posted 4 years ago #

    OK, just to close this topic: To solve my problem I copied the functions from wp-login.php to my plugin file, splitted them in two parts, the first one hooked to init, the other one to the page content.

    Then I modified the functions as needed.


Topic Closed

This topic has been closed to new replies.

About this Topic