Doesn't rewrite when form_id is user_login

jstirnaman - December 13, 2007 - 06:08
Project:Secure Login
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

If a user visits ?q=user and then tries to authenticate using form id=user-login, the url is not rewritten to https

I simply added another line to securelogin.module so that it looks like this:

function securelogin_form_alter($form_id, &$form) {

  if(   ($form_id == 'user_login_block' && variable_get('securelogin_loginform',    TRUE) == TRUE)
     || ($form_id == 'user_login'       && variable_get('securelogin_loginform',    TRUE) == TRUE)
     || ($form_id == 'user_edit'        && variable_get('securelogin_editform',     TRUE) == TRUE)
     || ($form_id == 'user_register'    && variable_get('securelogin_registerform', TRUE) == TRUE)
    )

It seems to work fine, but it could be improved.

#1

avf - December 13, 2007 - 17:48
Status:needs work» closed

You have an old version. This is fixed in the latest version.

 
 

Drupal is a registered trademark of Dries Buytaert.