Noob needs help with email account verification |
[eluser]zulubanslee[/eluser]
Ok so I have user create account, create a random string, store it in the database and send the user this link: http://example.com/login/verifyaccount/s...2829853473 User clicks on the link naturally, but when they do I get a 404 error. Here is my controller Code: $string = $this->uri->segment(3);
[eluser]Emkay[/eluser]
I'm not 100% sure but I don't think CI allows hyphens in the parameters or function names. Try using GET queries instead if you want to pass multiple variables. Use the form Code: http://example.com/login/verifyaccount?username=someusername&code=458492829853473 Get the username and code using $this->input->get() Code: $username = $this->input->get('username');
[eluser]jerry01[/eluser]
i thought hyphen was allowed, as per the config statement: Code: $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
[eluser]osci[/eluser]
@jerry01 hyphens are allowed as you showed. @zulubanslee getting a 404 means it doesn't find your controller or method. Is your class Login and method verifyaccount?
[eluser]jerry01[/eluser]
i had a similar problem at one point. It's because i had coded my link as Code: www.example.com/mtcontrlr/mymthd/123545 Quote:index.php the working link was Code: www.example.com/index.php/mtcontrlr/mymthd/123545 i assume that your issue is not something so simple though.
[eluser]zulubanslee[/eluser]
[quote author="osci" date="1311264928"]@jerry01 hyphens are allowed as you showed. @zulubanslee getting a 404 means it doesn't find your controller or method. Is your class Login and method verifyaccount?[/quote] Yes it is.
[eluser]zulubanslee[/eluser]
@jerry01 I thought of that and tried it, and it still doesn't work.
[eluser]osci[/eluser]
You should check error log files. Mind posting your controller in full? If you don't want to, do you have any other method in Login class? Is it working?
[eluser]zulubanslee[/eluser]
The controller is called login. Here is the function. Code: function verifyaccount($security_code) Also, where is the error log file; thanks |
Welcome Guest, Not a member yet? Register Sign In |