Reputation: 323
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?
Upvotes: 0
Views: 1163
Reputation: 323
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.
Upvotes: -1
Reputation: 4572
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.
Upvotes: 4