improve message after registration
This commit is contained in:
parent
77414c7cb9
commit
ab51102cd0
@ -21,12 +21,19 @@ function materio_user_register_submit(){
|
|||||||
$form_state = array( "values"=>$_POST);
|
$form_state = array( "values"=>$_POST);
|
||||||
drupal_form_submit($_POST['form_id'], $form_state);
|
drupal_form_submit($_POST['form_id'], $form_state);
|
||||||
|
|
||||||
$return['form_state'] = $form_state;
|
// $return['form_state'] = $form_state;
|
||||||
|
|
||||||
$return['errors'] = form_get_errors();
|
$return['errors'] = form_get_errors();
|
||||||
if($return['errors'])
|
if($return['errors']){
|
||||||
unset ($_SESSION['messages']['error']);
|
unset ($_SESSION['messages']['error']);
|
||||||
|
}else{
|
||||||
|
$messages = drupal_get_messages('status');
|
||||||
|
// $return['messages'] = $messages;
|
||||||
|
drupal_set_message(t("Congratulation, you juste created your free materiO' account, welcome !"), 'status');
|
||||||
|
foreach ($messages['status'] as $msg) {
|
||||||
|
drupal_set_message($msg, 'status');
|
||||||
|
}
|
||||||
|
}
|
||||||
// after registration user is automaticly logged in, thank's to login tobogan module
|
// after registration user is automaticly logged in, thank's to login tobogan module
|
||||||
|
|
||||||
drupal_json_output($return);
|
drupal_json_output($return);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user