[wp-hackers] modify or extend wp-login.php form within plugin

Alan J Castonguay alan at verselogic.net
Sat Jun 24 22:51:06 GMT 2006

6. Or, as I neglected to paste, using Output Buffering. Hook into 
wp_authenticate. If we have successful external auth, handle it, 
redirect and exit. Otherwise, ob_start("foo") and return. If successful 
internal wp auth, it'll redirect normally, as headers are not blocked by 
output buffering. If the form gets echo()'d, the script will reach the 
end of the page, and the function foo() called with the form in a 
string. (Much better than reading the file into a string.) In the ob 
handler, parse form regexen to inject extra fields, and return the string.

Still has forwards compatibility issues, but not /nearly/ as fugly.

Alan J Castonguay

More information about the wp-hackers mailing list