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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | drupal-n603638.patch | 408 bytes | damienmckenna |
Comments
Comment #1
manasiv commentedComment #2
sivaji_ganesh_jojodae commentedYou are right
user.pages.incfile inclusion is unnecessary.Comment #3
damienmckennaHere you go. This just removes the 'file' key from the $items array.