Skip to main content
Tweeted twitter.com/#!/StackDrupal/status/57641473067327488
deleted 8 characters in body; edited title; deleted 2 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

Anonymous user form submission drupal 7

I have a situation where after doing the basic registration the user is redirected to a page where he needs to fill a small form.

iI aim at implementing the hook_user_inserthook_user_insert() and hook_mentohook_menu() to do something like this

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;
}

In selectplan_form iselectplan_form() I will define my new form and then, using the uid iuser ID, I would save data into user table.

Now what is happening is after theThe basic user registration form is being submitted, the redirectionuser is redirected to splan/uid is happening, but iI also get the following error.

You are not authorized to access this page.

You are not authorized to access this page.

Now iI have changed permissions to allow anony.anonymous users to create and edit webform, but still the problem existsstill persists.

Please help!!!!!!!!

Anonymous user form submission drupal 7

I have a situation where after doing the basic registration the user is redirected to a page where he needs to fill a small form.

i aim at implementing the hook_user_insert and hook_mento do something like this

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;
}

In selectplan_form i will define my new form and then using the uid i would save data into user table.

Now what is happening is after the basic user registration form is being submitted the redirection to splan/uid is happening but i also get the following error.

You are not authorized to access this page.

Now i have changed permissions to allow anony. users to create and edit webform but still the problem exists.

Please help!!!!!!!!

Anonymous user form submission

I have a situation where after doing the basic registration the user is redirected to a page where he needs to fill a small form.

I aim at implementing the hook_user_insert() and hook_menu() to do something like this

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;
}

In selectplan_form() I will define my new form and then, using the user ID, I would save data into user table.

The basic user registration form is being submitted, the user is redirected to splan/uid, but I also get the following error.

You are not authorized to access this page.

I have changed permissions to allow anonymous users to create and edit webform, but the problem still persists.

Source Link
ayush
  • 552
  • 1
  • 6
  • 21

Anonymous user form submission drupal 7

I have a situation where after doing the basic registration the user is redirected to a page where he needs to fill a small form.

i aim at implementing the hook_user_insert and hook_mento do something like this

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;
}

In selectplan_form i will define my new form and then using the uid i would save data into user table.

Now what is happening is after the basic user registration form is being submitted the redirection to splan/uid is happening but i also get the following error.

You are not authorized to access this page.

Now i have changed permissions to allow anony. users to create and edit webform but still the problem exists.

Please help!!!!!!!!