How to add a custom link to login form block with hook_form_alter How to add a link with custom path to my login block with hook_form_alter. I 've created a custom module but i dont know what to add to my hook_form_alter function.
In Drupal 7 you can use #markup attribute, as suggested by MOLOT


/**
 * Implements hook_form_alter()
 */
function hook_form_alter(&$form, &$form_state, $form_id) {
  switch ($form_id) {
    case 'user_login':
    case 'user_login_block':
      $form['link'] = array('#markup' => l(t('Link text'),'node'));
      break;
  }
}

Note:


hook_form_alter
Forms API reference