1

I have a page that will allow the user to change their name, email address etc.

If I have an email field on my page and submit I get this error.

Param “password” doesn’t exist.

I have read that in order to change a users' email, they need to enter their existing password. I don't have the password field on my profile page...I suppose I could.

Or should I make the whole thing an ajax submit, if the email has changed - show a modal or something asking for a password?

How have others solved this?

Thank you for any suggestions!

3

On the front-end of the site, if you're going through Craft's UsersController->actionSaveUser(), then you're correct... we do require the current user's existing password to create an elevated session for several security purposes. How you present that to the user is completely up to you (as with anything else front-end related in Craft).

If you absolutely, 100%, don't want that workflow and are willing to accept the security risks of bypassing that behavior, then you can create your own plugin that exposes its own controller action, point your form to it and do whatever necessary business logic needed (modifying email directly in the database, etc.).

  • Thanks Brad, I am using saveUser and after I kept getting the error I remember the elevated session update. Let's say I just use a modal similar to how the CP does. Is there a specific uri I need to send the password to or does Craft just understand what I'm trying to do? – Damon Sep 1 '16 at 4:24
  • Nope, saveUser should just take care of it all. – Brad Bell Sep 1 '16 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.