user login from membership redirect to membership : WONT WORK

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy 2013-02-11 20:37:41 +01:00
parent d6bc2debdf
commit 2506c8b8ac

View File

@ -100,7 +100,9 @@ function materio_user_form_alter(&$form, &$form_state, $form_id) {
$form['actions']['#type'] = "container";
// $form['actions']['submit']['#value'] = t('Join');
// $form['#submit'][] = "materio_user_user_register_form_submit";
if( $_GET['q'] == 'node/11187' ){
$form['#submit'][] = "materio_user_user_login_form_submit";
}
}
@ -130,6 +132,17 @@ function materio_user_user_register_form_submit($form, &$form_state){
// drupal_set_message(t('Welcome, you just join materiO\'! now you can choose the membership that\'s right for you, or !link', array('!link'=>$frontlink)));
}
function materio_user_user_login_form_submit($form, &$form_state){
unset($_REQUEST['destination'], $_REQUEST['edit']['destination']);
$form_state['redirect'] = array(
'node/11187',
array(
'fragment' => 'content-bottom', // if we login from the membership page, then go directly to the form
)
);
}
function materio_user_webform_client_111186_validate($form, &$form_state){
// dsm($form, 'form');
// dsm($form_state, 'form_state');