I install logintoboggan and loginazon modules. When I set "Present login form on access denied (403): " in logintoboggan module. It will be redirect to the login page in loginazon style with the url that is access denied. After I type my email address and click "No, I am a new user". The page will not be redirect to the register page.
I make some patch it configure that issue.
--- a/loginazon.module 2010-09-30 01:51:15.000000000 +0700
+++ b/loginazon.module 2010-10-15 16:08:57.000000000 +0700
@@ -66,6 +66,10 @@ function loginazon_form_alter(&$form, $f
if(!empty($_GET['mail'])){
$form['mail']['#value'] = $_GET['mail'];
}
+
+ if(!empty($_GET['redirurl'])){
+ $_REQUEST['destination'] = $_GET['redirurl'];
+ }
// Add header
$new_form_items['header'] = array(
@@ -85,8 +89,10 @@ function loginazon_user_login_validate($
if($form_state['values']['has_password']==0){
// Don't display validation messages from the login form.
$messages = drupal_get_messages();
+ $_REQUEST['destination'] = 'user/register';
+
// Redirect to the registration
- drupal_goto('user/register','mail='.urlencode($form_state['values']['name']));
+ drupal_goto($base_url.'/user/register','mail='.urlencode($form_state['values']['name']).'&redirurl='.urlencode(substr(request_uri(), 1)));
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| loginazon.module.patch | 1002 bytes | tantai |
Comments
Comment #1
cwebster commentedThanks!
Unfortunately, the patch didn't seem to work. Trying to apply manually...
Comment #2
cwebster commentedManually committed patch. Seems to work! Added a new dev version for further testing.
Comment #3
cwebster commented