materio_personalnotes.pages.inc 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. //
  3. // function materio_personalnotes_registerblock(){
  4. // $return = array();
  5. // $block = block_load('materio_personalnotes','user_createaccount');
  6. // $return['block'] = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
  7. // drupal_json_output($return);
  8. // }
  9. //
  10. // function materio_personalnotes_loginandregisterblock(){
  11. // $return = array();
  12. // $block = block_load('materio_personalnotes','user_register');
  13. // $return['block'] = drupal_render(_block_get_renderable_array(_block_render_blocks(array($block))));
  14. // drupal_json_output($return);
  15. // }
  16. //
  17. // function materio_personalnotes_register_submit(){
  18. // $return = array();
  19. // $return['POST'] = $_POST;
  20. //
  21. // $form_state = array( "values"=>$_POST);
  22. // drupal_form_submit($_POST['form_id'], $form_state);
  23. //
  24. // // $return['form_state'] = $form_state;
  25. //
  26. // $return['errors'] = form_get_errors();
  27. // if($return['errors']){
  28. // unset ($_SESSION['messages']['error']);
  29. // }else{
  30. // $messages = drupal_get_messages('status');
  31. // // $return['messages'] = $messages;
  32. // // drupal_set_message(t("Congratulations, you juste created your free materiO' account, welcome !"), 'status');
  33. // foreach ($messages['status'] as $msg) {
  34. // drupal_set_message($msg, 'status');
  35. // }
  36. // }
  37. // // after registration user is automaticly logged in, thank's to login tobogan module
  38. //
  39. // drupal_json_output($return);
  40. // }
  41. //
  42. // function materio_personalnotes_login_submit(){
  43. // $return = array();
  44. // $return['POST'] = $_POST;
  45. //
  46. // $form_state = array("values"=>$_POST);
  47. // drupal_form_submit($_POST['form_id'], $form_state);
  48. //
  49. // $return['errors'] = form_get_errors();
  50. // if($return['errors'])
  51. // unset ($_SESSION['messages']['error']);
  52. //
  53. // // if user-login form succed we retreive the user uid on $form_state, then we can effectively loggin the user
  54. // if($uid = $form_state['uid'])
  55. // user_login_submit(array(), $form_state);
  56. //
  57. // drupal_json_output($return);
  58. // }
  59. //
  60. //