Post Undeleted by animuson
    Post Deleted by Community
4 deleted 8 characters in body
source | link

IfIt's better to set proper permissions, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

However, if you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}

However, it's better to set proper permissions instead, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

If you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}

However, it's better to set proper permissions instead, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

It's better to set proper permissions, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

However, if you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}
3 added 2 characters in body
source | link

If you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}

However, I would justit's better to set proper permissions instead, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

If you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}

However, I would just set proper permissions instead, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

If you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}

However, it's better to set proper permissions instead, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

2 added 152 characters in body
source | link

If you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}

However, I would just set proper permissions instead, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

If you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}

However, I would just set proper permissions instead.

If you really want to remove those links from the login block using the hook, then the following code should work:

function hook_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'user_login_block') {
    unset($form['links']);
  }
}

However, I would just set proper permissions instead, because removing the links won't prevent users from typing user/register and user/password in the browser's address bar and reaching them directly.

1
source | link