Welcome Guest, Not a member yet? Register   Sign In
URI/Email Question
#1

[eluser]ramabodhi[/eluser]
I dont fully understand URI's and I think i have the wrong impression

im using an automated email verification sending a validation key via email.. i want the email to contain a link as thus:

index.php/register/activate/validation_key

how do i set activate function to take in the validation key variable?
#2

[eluser]brianw1975[/eluser]
Quote:index.php/register/activate/validation_key

in your register.php controller create the following:

function activate($key)
{
echo "do something with this $key";
}
#3

[eluser]ramabodhi[/eluser]
thats what i tried, but i couldn't get it to work due to a silly hidden syntax error..

if the function is activate($user, $key) would the URI be /activate/$user/$key ?
#4

[eluser]brianw1975[/eluser]
wouldn't even use the user string -- the activation string should be unique every time and so therefore only correlate to one account - ever.

make the activation key 32 or 64 characters that are comprised of any valid uri characters so it won't throw an invalid characters in url error and just activate the account.

edit: but yes, $user/$key should do it if you want to do it that way.
#5

[eluser]ramabodhi[/eluser]
well right now i'm setting the activation key as an encryption of one of the unique user fields, versus my original idea of a random string, which has a potential for duplication(albet small)?

is this a bad idea, or a security hole? if not.. right now my only issue is the == at the end of my encrypted strings, which isn't registering in the url, which can be changed by perhaps using a different codex? i dont know a whole lot about encryption, but it seems like a solid way to get an activation key

[edit]How do i get a strictly alpha numeric encryption?




Theme © iAndrew 2016 - Forum software by © MyBB