Disable user/register

Public

Disable user/register. Handy if you're using a module like profile2 and registering accounts through another path.

Get raw version
php
  1. /**
  2.  * Implements hook_menu_alter().
  3.  */
  4. function HOOK_registration_menu_alter(&$item) {
  5.  
  6. $item['user/register']['access callback'] = FALSE;
  7.  
  8. }