Irksome Posted July 1, 2007 Share Posted July 1, 2007 Hi, I've just created a login system, and everything works fine. There's only one problem that I'm faced with at the moment, and that's the update profile page. Now when you appear on this page, the data form fields show up, containing your current username, email address, name etc. But when you click submit, it comes back with "Your email is already in use!". Yes it's in use, because the user is signed up with that address. What piece of code would I need to add in order to update the profile without getting an email in use error? Any help would be appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
no_one Posted July 1, 2007 Share Posted July 1, 2007 Some would give user's and id and those would be passed along to each page, just compare id's. If the updater_id == db_id then it should be fine. If you don't want to use id's, then you might implement fields for "old" username & password to enter for comparison (if changed) before updating. Any of that sound good? Quote Link to comment Share on other sites More sharing options...
Irksome Posted July 1, 2007 Author Share Posted July 1, 2007 I'm currently using ID's in my user profiles, but is updater_id == db_id the actual code I need to use? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted July 1, 2007 Share Posted July 1, 2007 Just take away the code that is checking if the email is already in use...or ONLY check if the email address is in use if they are changing their email. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.