How to hid "Register/create account" link

Hi everyone, I am trying to hide the “Register/create account” link on the login page/block. I do not want users to create account directly. I want them to be redirected to the registration page after completing a certain task… bottom line is, I do not want the “Register/create account” link to be visible to anonymous users, but I want users to create accounts by themselves when I send them the link. Any help please? I need this on both Drupal 7 and Drupal 8


Drupal version: