Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
  • Auth\SimpleUserWrongPassword [ Error ]:
    Old password is invalid

    PKGPATH/auth/classes/auth/login/ormauth.php @ line 332

  • When doing what?

    If you try to use the standard update method, it was build for things like user profiles, and it requires the current user password to make sure the data is not tampered with. This is mentioned in the docs.

    If you want to update in code, use the included User model and standard ORM calls.
  • am using:

            'email'        => $val->validated('email'),  // set a new email address
            'password'     => $val->validated('password'),    // set a new password
            'old_password' => $val->validated('oldpassword'), // to do so, give the current one!
  • That should work fine if the old password is correct?

    you get the error if the passed old password is empty(), or if the hash of the old password doesn't match with the hash stored.
  • Ok. I need first hash the old password before execute the update? 

    ok my bad, am traying to update other users not the logued user :-(
  • HarroHarro
    Accepted Answer
    No, update_user() will hash it for you.

    As said, it was made for users changing profile information, it does therefore only work for the current logged-in user.
  • The controller make the update locally but in the server don't do it  :-) any idea?
  • No, there is nothing I can think of that is server dependent.
  • Finally i found the error for one reason it make the update locally but in the server there is an error with the EMAIL it can be duplicated

    I remove the email from update and work fine.
  • Not if you create accounts using create_user(). It will check for both duplicate email and duplicate username, and will throw an exception if you have a collision.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion