#120 login_form hook is placed after login button


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

Issue is present in 1.5.1cvs (src/login.php v 1.123),
1.4.6cvs(src/login.php v and older versions.


  • Tomas Kuliavas

    Tomas Kuliavas - 2005-08-04

    Logged In: YES

    Proposed patch attached.

    Main issue - it changes hook type and is not backwards

  • Tomas Kuliavas

    Tomas Kuliavas - 2005-08-04

    proposed patch

  • Jonathan Angliss

    Logged In: YES

    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.

  • Tomas Kuliavas

    Tomas Kuliavas - 2005-08-11

    Logged In: YES

    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

    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.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks