Reset Password Errors - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Reset Password Errors (/showthread.php?tid=6915) |
Reset Password Errors - El Forum - 03-17-2008 [eluser]Kemik[/eluser] Hello, I'm building a reset password page. The random key is passed via the third uri and a form (password & repeat password text fields) is displayed if it's valid. Code: if (logged_in()) { The problem I'm having is how I redirect the user back to the page so I can display the success message without getting errors. Number one, the "No random string passed" error will be displayed and even if I add a string (e.g. done) to the end of the url the valid string check will give the "String not in the database" error. I'm sure I've encountered the problem before but I cannot remember how I got around it. I want to try and keep my code in the one view file. View Code: if flashdata display success message else display form To be clear, I don't want to know how to code the page itself. I've already done that. The problem I'm having is how can I display the success message to the user without errors? As a temp fix I've set the code to redirect to the login page and check for the flashdata there. It seems like a better idea in this case as the user can log straight in after resetting their password. However, it would be nice to know how I can get around the problem for future reference. |