Download & Extend

declare #validate and #submit for consistency

Project:Secure Site
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

I am getting the following error on the login page when Securesite is enabled.
Apart from that I don't notice any adverse effect.

warning: array_unshift() [function.array-unshift]: The first argument should be an array in /var/www/drupal/sites/all/modules/logintoboggan/logintoboggan.module on line 191.

Comments

#1

Title:watchdog error(first argument should be an array)» declare #validate and #submit for consistency
Project:LoginToboggan» Secure Site
Version:6.x-1.6» 6.x-2.x-dev

meh, i knew i should have coded more defensively there...

i put in some paranoid checks in LoginToboggan to avoid this issue in the future.

incidentally, that error does break LT's validation handler, which would be a problem if you have 'Login with e-mail' set.

the problem is securesite's implementation of the login form, securesite_user_login(&$form_state). it doesn't declare any #submit or #validate handlers at all in the form.

i would recommend that function be patched to at least include empty arrays for #validate and #submit -- most other modules are probably expecting those to be arrays.

attached patch for the 6.x-2.x branch does this.

AttachmentSize
securesite_declare_handlers.patch 728 bytes

#2

Priority:minor» normal
Status:active» needs review

#3

Patched. Should this issue be moved to the Secure site queue?

#4

@skizzo: it's already in the Secure Site queue -- read the metadata table at the top of the issue...

#5

I was experiencing this issue with Secure Site 6.x-2.4, and LoginToboggan 6.x-1.6.

The patch in #1 (patching Secure Site 6.x-2.4) worked for me.

Thanks!

#6

Status:needs review» needs work

The patch in #1 does get rid of the error, yes. But it did not completely solve the problem for me. I still can only able login with my username, but not my e-mail address (which LoginToboggan allows me to do), which I could do before I enabled Secure Site.

The documentation for securesite_user_login() says the following:

We do not use the default validate and submit functions because we may allow anonymous users.

I also found this issue: #419924: Securesite and Logintoboggan. Are the two modules simply incompatible?

nobody click here