There is extra code in fancy_login.module that is not necessary and moreover, creates problems for modules that try to style user_login and user_login_block forms.

CommentFileSizeAuthor
#1 fancy_login.form#1515994.patch19.64 KBiva2k

Comments

iva2k’s picture

Status: Active » Needs review
StatusFileSize
new19.64 KB

I reviewed the code in question, and it appears that most source code of Drupal core's user_login_block() function has been copied into fancy_login.module, and the differences appear to be only to insert ssl icon into the form hierarchy in one of two spots based on configuration. Drupal has a nice #weight mechanism for ordering form elements which can be used instead.

Attached is a patch that includes improvements:
1. Using Drupal user_login_block (a lot of redundand code removed)
2. Using Drupal #weight system to order form elements
3. Can't help but cleanup coding style according to Drupal coding conventions, remove whitespace at line ends
4. Compatibility with login styling modules improved (i.e iTweak Login module works properly now with Fancy Login)

I tested the patch to not break any functionality and solve compatibility issue. People, please test and set to RTBC.

iva2k’s picture

I have a hunch that this patch in #2 may also solve #1296570: Can't Load OpenID login screen

jaypan’s picture

Issue summary: View changes
Status: Needs review » Fixed

Thank you for the patch. However, I've decided to drop support of Version 6.x-1.x in favor of version 6.x-2.x which is a backport of version 7.x-3.x.

Version 6.x-2.x uses an aliased version of the user_login_block form, and should solve the issues you are seeing. Please upgrade and test. If the problem is not solved, please re-open the issue, and set the version to 6.x-2.x.

Thank you.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.