-
-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
activate_user.php #98
Comments
So the concept here is that API pages should be accessible in two different ways - via an AJAX request, or via a plain ordinary page request. The idea is that if you wanted to make your site accessible to non-JS users (or users using an email link, like in the case of That being said, the implementation is admittedly far from perfect. Something that needs to be done is to revise the API pages to use the functions I created in I'm also open to modifying/completely changing the way we do error handling. So far the "error stream" approach is the best I've come up with, but maybe there is a way to improve it. |
Okay, but it still looks like if an error occurs, the script immediately exits and doesn't redirect to any page. header("Location: " . getReferralPage()) only gets called if no errors occur. |
Yeah this is why I said we should write a |
I'd be happy to look into it. I'm still getting familiar with the inner workings and wouldn't want to screw anything up. |
That's the awesomeness of github if you mess it up you can always pull a new copy haha |
When a user clicks the activation link in the email, it takes them to activate_user.php with a token attached.
However, it looks like the 'else if' on line 63 just echoes a json string if an error occurs (which then gets displayed in the browser).
If setUserActive() is successful, it look like the 'if' on line 82 always returns false and line 85 redirects the user to getReferralPage() (which should only happen if ajaxMode is false - but making it look like everything is working fine).
So, if you took out line 85, the page would just display a json string or nothing, and not redirect the user anywhere.
Am I seeing this right?
The text was updated successfully, but these errors were encountered: