Hi,

I am looking forward to see this functionality in web form .If anyone have nay idea how to implement this please guide me.

Anonymous user can register for events and he can unregister using unregister link from the conformation email.

Currently the link is like : http://localhost/eve/node/5/submission/1/unregister

I am having an issue... if the user change the /submission/1/unregister to /submission/2/unregister ,
he will be able to unregister others signup stuffs.How can i hash the url or is there any way i can
assign unique url for each submission

with regards,
Don Asok

Comments

donkasok’s picture

Title: aNONYMOUS USER CAN REGISTER AND DELETE HIS SUBMISSIONS » ANONYMOUS USER CAN REGISTER AND DELETE HIS SUBMISSIONS
vm’s picture

Title: ANONYMOUS USER CAN REGISTER AND DELETE HIS SUBMISSIONS » Anonymous user can register and delete his submissions
donkasok’s picture

Hi,

Is there any way that i can accomplish this.

with regards,
Don Asok

Sree’s picture

did you tried the pathauto with token modules?

Can you detail the issue in more detailed way.

donkasok’s picture

StatusFileSize
new105.35 KB
new101.47 KB
new191.44 KB
new96.56 KB

Hi,

i am using webform module to create a free signup form.
So authenticated and anonymous user can signup for the event.
Once a user signed up, an email will sent to user.
In that email there is an unregister link , once they click , they will be able to see their submission and a button to unregister.
If you look into the url of unregister you will be able to see url like http://localhost/eve/node/5/submission/5/unregister
if an anonymous user change it into 4 he will be able to access others submission.How can i hash the url .
Please see the attachments

with regards
Don Asok

donkasok’s picture

Hi,

Is there any way that i can accomplish this.

with regards,
Don Asok

donkasok’s picture

Looking for help/ paid custumization

donkasok’s picture

sree any idea about this

donkasok’s picture

sree any idea about this

robertdouglass’s picture

You need to have something concrete to link submissions to users. Email address would be a good one. Ask for the email address in the webform, and once a user has registered, allow them to delete all of the webform submissions that were submitted using the same email as on their user account. This will all take custom programming.

donkasok’s picture

Thank You Robert,I will work on this suggestion.

Thanks a lot
With regards,
Don Asok

donkasok’s picture

Hi Robert,

As i was looking for a solution , I created an access called unregister submission.So whenever user submitted a form (anonymous user too), a hashed value will store in database. The hashed value is md5 of the time and ip addres. Now i am trying to append the hash value to the url of unregister.The codes i created was given below.Please look into this and give me a suggestion .

Database Change
------------------------------
In schema webform_submissions add a varchar for hash value

'hash_value' => array(
'description' => 'The hash value for user submission.',
'type' => 'varchar',
'length' => 128,
),

Webform_submissions.inc
------------------------------------------
Insert hashed values into database
In function webform_submission_insert($node, $submitted)

$hash_value = md5(time().ip_address());
$result = db_query("INSERT INTO {webform_submissions} (nid, uid, submitted, remote_addr, hash_value) VALUES (%d, %d, %d, '%s')", $node->nid, $user->uid, time(), ip_address(), $hash_value);

Webform.module
---------------------------
In node submissions, add for unregister

$items['node/%webform_menu/submission/%webform_menu_submission/unregister/%hash_value'] = array(
'title' => 'Unregister',
'load arguments' => array(1),
'page callback' => 'drupal_get_form',
'page arguments' => array('webform_submission_unsregister_form', 1, 3,5),
'access callback' => 'webform_submission_access',
'access arguments' => array(1, 3,5, 'unregister'),
'weight' => 3,
'type' => MENU_LOCAL_TASK,
);

In function webform_submission_access

case 'unregister':
return user_access('unsregister own webform submissions');

In function webform_perm()
'unsregister own webform submissions',

In function webform_access($op, $node, $account)
case 'unregister':
return user_access('unsregister own webform submissions', $account);

Thank You

Ravi.J’s picture

Hi,
Did you manage to find a concreate solution to the problem ? If yes can you share how you solved the issue..

quicksketch’s picture

Status: Active » Closed (duplicate)