how change hook_user?
i need change hook user.I've inserted code in line 326 of user.module. it's work .db_query('INSERT INTO {beep} (uid) VALUES (%d)', $array['uid开发者_开发技巧']);
Do not hack core! Please help me.
Make a custom module that implements hook_user() and wrap your code in a conditional so that it fires when you want it to:
function my_module_user($op, &$edit, &$account, $category = NULL) {
if( /* condition goes here */) {
/* Do some custom processing */
db_query('INSERT INTO {beep} (uid) VALUES (%d)', $array['uid']);
}
}
Look here http://drupal.org/developing/modules for details on creating your own modules.
精彩评论