我有一种情况,在完成基本注册后,用户被重定向到他需要填写一个小表格的页面。
我的目标是实施hook_user_insert
并hook_menu
做这样的事情
function registration_user_insert(&$edit, $account, $category){
drupal_goto('splan/'.$edit['uid']);
}
function registration_menu() {
$items['splan/%'] = array(
'title' => 'Select a Plan',
'page callback' => 'drupal_get_form',
'page arguments' => array('selectplan_form'),
'access callback' => TRUE,
'type' => MENU_CALLBACK
);
return $items;
}
在 selectplan_form 中,我将定义我的新表单,然后使用 uid 将数据保存到用户表中。
现在发生的事情是在提交基本用户注册表单之后重定向到 splan/uid 正在发生,但我也收到以下错误。
You are not authorized to access this page.
现在我已更改权限以允许匿名。用户创建和编辑网络表单,但问题仍然存在。
请帮忙!!!!!!!!