I cam across this today -

The way user/register is defined in user_menu() is that -
$items['user/register'] = array(
'title' => 'Create new account',
'page callback' => 'drupal_get_form',
'page arguments' => array('user_register'),
'access callback' => 'user_register_access',
'type' => MENU_LOCAL_TASK,
'file' => 'user.pages.inc',
);

But if you search for a function named user_register in user.pages.inc, it is not present there. The function is defined in the module.

I think it works because the module functions are always available.

FIX -
We should move the user_register() function to the user.pages.inc file. A small observation, I am aware, but it will help a new developer if he wants to understand the core and use it for custom development.

Thanks,
Manasi

CommentFileSizeAuthor
#3 drupal-n603638.patch408 bytesdamienmckenna

Comments

manasiv’s picture

Status: Active » Needs work
sivaji_ganesh_jojodae’s picture

You are right user.pages.inc file inclusion is unnecessary.

damienmckenna’s picture

Version: 6.14 » 6.25
Status: Needs work » Needs review
StatusFileSize
new408 bytes

Here you go. This just removes the 'file' key from the $items array.

Status: Needs review » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.