Ok, I think I should start from the beginning...
I'm trying to accomplish is to make a
humble hack for having a "invite xoops only" like it is talked in this
post.
So... Using the
profile module that comes in xoops 2.4.4 installation, I want to add the necessary php lines in that module that would help me to
compare "user_referal" (which is going to be an
invitacion code filled by the user) with another database field named
"user_refnumber" (that can be in the same table) and it's
gonna be filled with an invite code generator (another module that Im trying to create).
Example of how it should work:
1) A registered user goes to the "
module - invite generator"
2) He or she
generates a random string of 5 letters and 2 numbers (or any other combination) that is
stored in "user_refnumber"3) The
invitation string is sended by email to his/her friend4) When his/ her friend is trying to
sing up, the registration form (of the profile module) asks the friend for the invitation code.
5) The code that is filled by his/her friend
(user_referal) is now compared with the one that the module generated
(user_refnumber). If they are the same, the registration process can continue... If not, it stops.
6)
After the email account confirmation of the new user,
the stored "user_refnumber" is deleted from the data base.
I know how to do some of the things of this process with my very basic php knoweadge, but
I need help comparing fields in the profile module and deleting the "user_refnumber" after the new user's email is confirmed. I more or less have a future code for the "module - invite generator". It's from another source that is not xoops... still have to convert it.
Please, give me a hand on this. I will be glad to share any of the results that I can get (hopfully a new very crapy module that could evolve into something nicer...) ;)
Thank you =)