Plugins can add own form fields only after login button.
For example:
Name: [ ]
Password: [ ]
{ Login }
Language: [ ]
It makes interface inconsistent and requires table
layout code duplication in plugin that uses login_form
hook.
Issue is present in 1.5.1cvs (src/login.php v 1.123),
1.4.6cvs(src/login.php v 1.98.2.8) and older versions.
Logged In: YES
user_id=225877
Proposed patch attached.
Main issue - it changes hook type and is not backwards
compatible.
proposed patch
Logged In: YES
user_id=620333
Hrm, I was trying to work out why it wasn't backwards
compatible, and I'm not sure there really is any. The only
difference I really see is that it concatinates the results
now instead of overwriting with the last plugin in the list.
Do you have two example plugins that would be affected by
this? I know login_auto is one, which adds a table which
would be okay in the position that you suggested in your patch.
plugin difference
Logged In: YES
user_id=225877
difference between plugin that uses original login_form hook
and modified login_form hook is attached.
original hook needs echo calls, updated one needs return call
original hook needs output of entire table, updated one
needs only table row. If plugins insert visible formating,
they break html. Only hidden input fields might be displayed
correctly.
sm-plugins project (http://sf.net/projects/sm-plugins)
contains select_language plugin, that uses login_form hook
and adds visible elements to form. I suspect that login_auto
will be broken same way as select_language.
Logged In: YES
user_id=225877
http://thread.gmane.org/gmane.mail.squirrelmail.plugins/9817