1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- //
- // function materio_personalnotes_registerblock(){
- // $return = array();
- // $block = block_load('materio_personalnotes','user_createaccount');
- // $return['block'] = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
- // drupal_json_output($return);
- // }
- //
- // function materio_personalnotes_loginandregisterblock(){
- // $return = array();
- // $block = block_load('materio_personalnotes','user_register');
- // $return['block'] = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
- // drupal_json_output($return);
- // }
- //
- // function materio_personalnotes_register_submit(){
- // $return = array();
- // $return['POST'] = $_POST;
- //
- // $form_state = array( "values"=>$_POST);
- // drupal_form_submit($_POST['form_id'], $form_state);
- //
- // // $return['form_state'] = $form_state;
- //
- // $return['errors'] = form_get_errors();
- // if($return['errors']){
- // unset ($_SESSION['messages']['error']);
- // }else{
- // $messages = drupal_get_messages('status');
- // // $return['messages'] = $messages;
- // // drupal_set_message(t("Congratulations, 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
- //
- // drupal_json_output($return);
- // }
- //
- // function materio_personalnotes_login_submit(){
- // $return = array();
- // $return['POST'] = $_POST;
- //
- // $form_state = array("values"=>$_POST);
- // drupal_form_submit($_POST['form_id'], $form_state);
- //
- // $return['errors'] = form_get_errors();
- // if($return['errors'])
- // unset ($_SESSION['messages']['error']);
- //
- // // if user-login form succed we retreive the user uid on $form_state, then we can effectively loggin the user
- // if($uid = $form_state['uid'])
- // user_login_submit(array(), $form_state);
- //
- // drupal_json_output($return);
- // }
- //
- //
|