Not fully compatiable with Logintoboggan, causes fatal error

jamestamr - April 22, 2009 - 21:09
Project:Email Registration
Version:5.x-2.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

By default, Email Registration and Logintoboggan will not work together.

An anonymous user who tries to view a page with the user login block will receive a fatal error on line 61.

This is caused by logintoboggan alterating the block to a text link by default leaving $form['#validate'] empty. This results in Unsupported operand types.

There are 2 ways to fix it.

1) Make the user change the user login block type from a link to standard (this is set within the logintoboggan module)

Or,

2) Alter the code in Email Registration from:

<?php
 
case 'user_login_block':
   
$form['name']['#title'] = t('E-mail');
   
$form['#validate'] = array('email_registration_user_login_validate' => array()) + $form['#validate'];
    break;
?>

To:

<?php
 
case 'user_login_block':
    if (!empty(
$form['#validate'])) {
     
$form['name']['#title'] = t('E-mail');
     
$form['#validate'] = array('email_registration_user_login_validate' => array()) + $form['#validate'];
    }
    break;
?>

#1

jamestamr - April 22, 2009 - 21:10

Should of said this occurs on lines 59-62.

 
 

Drupal is a registered trademark of Dries Buytaert.