Closed (duplicate)
Project:
Registration codes
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2007 at 05:52 UTC
Updated:
18 Jul 2007 at 13:52 UTC
if (!in_array(trim($edit['regcode_code']), $regcodes)) {
form_set_error('regcode_code', t('Invalid registration code'));
watchdog('regcode', t('User entered invalid registration code: ') .
$edit['regcode_code'], WATCHDOG_WARNING);
}else{
//reg code successful now remove it or mark it as being used, so it cant be used more than once.
//code required
}
Comments
Comment #1
d------ commentedComment #2
jvermillion commentedregcode is more like a password for signing up for the site. Everyone who is invited to the site is given the same registration code. This "fix" would only be useful if the regcodes were individually generated.
Comment #3
bakwas_internet commentedI have written this code for removing the used regcode , but I have no idea how to save the new array at this point. Can someone please point me to related api or functions.
Comment #4
bakwas_internet commentedDid some more hacking and finally came up with following code. This is working fine on my system. Can other people test it and give me their feedback.
Comment #5
bakwas_internet commentedComment #6
colanThis is a duplicate of http://drupal.org/node/154355.