Q:

Remove create account link in Drupal 7

I saw this on Drupal website
Anyway go to user.module, function user_block and remove or comment (//):
<?php
  if (variable_get('user_register', 1)) {
    $items[] = l(t('Create new account'), 'user/register', array('title' => t('Create a new user account.')));
   }
?>

Will it be good to edit core modules?

A:

No, it isnt good because when you try to update Drupal to new versions in the future, you remove this code and lost your changes.
You can remove this link via Admin in User settings, checking this field: "Only site administrators can create new user accounts".
Regards.

A:

I've added
$form['links'] = '';

in the hook_alter function.
So, the register and forgot password links are not showing up anymore.
Thank you all anyway.

