Embed some user profile fields in a block form I've added some fields to user profile.
None of these fields are displayed on registration form, but I want user can edit them quickly when he is logged.
I want to embed some fields in a static content and display them to the user: how can I manage this? Can I create a php page or is it better using hook_form?
This should give you a start. Probably it is not the most elegant solution, but after 5 minutes of hacking, this is what I got. It works, and updates the profile fields (alone).

  function custom_block_info() {
     $blocks['user_profile'] = array(
       'info' =&gt; t('User profile edit'),
       'cache' =&gt; DRUPAL_NO_CACHE,
     );

     return $blocks;
    }

    function custom_block_view($delta = '') {
      $block = array();

      switch($delta) {
        case 'user_profile':
          $block['subject'] = t('Fill your profile');
          $block['content'] = drupal_get_form('custom_profile_form');
          break;
      }

      return $block;
    }

    function custom_profile_form($form, &amp;$form_state) {
      global $user;

      $form_state['user'] = $user;
      $form['#user'] = $user;
      $form['#user_category'] = 'account';
      $form['actions']['submit'] = array(
        '#type' =&gt; 'submit',
        '#weight' =&gt; 100,
        '#value' =&gt; t('Save'),
      );

      $form['#action'] = url('user/' . $user-&gt;uid . '/edit');
      // $form['#validate'][] = 'user_profile_form_validate';
      $form['#submit'][] = 'user_profile_form_submit';
      field_attach_form('user',$user,$form,$form_state);

      return $form;
    }