Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
SimpleAuth/change_password problem
  • Dear friend,

    I'm trying to change the password using the change_password method in SimpleAuth.
    In previous versions, I called the reset_password method and got a new password without a hash version, then I used that password as “old_password” to call change_password.
    I'm trying to change the password using the following steps:
    a) run the php oil console
    b) Auth::reset_password(“username”);

    At this point, the following string:

    Co9nb+qAGyv5KWowZDbunt6+8LSiIiinnboDP2ovX+Q=

    is displayed as the new password, but this password is already a hashed value

    And if I use it to change the user's password using the change_password method

    c) Auth::change_password(“Co9nb+qAGyv5KWowZDbunt6+8LSiIiinnboDP2ovX+Q=”, “new_pwd”, “username”);

    The following error message is displayed:

    Parse Error - Call to a member function get() on array
      in myapplication\fuel\packages\auth\classes\auth\login\simpleauth.php on line 351

    My question is: how can I change the user's password using the console?
    Thanks in advance
  • Thanks for your fix
  • I'm sorry, but I keep getting the follow error message

    Error [ Error ]:
    Call to a member function get() on array
    PKGPATH//auth/classes/auth/login/simpleauth.php @ line 351

    when I call the method  change_password("system_generated_password","my_new_password","username)

    The fix shows me the system_generated_password and I can access the application, but I still can't change it.
    TIA
  • HarroHarro
    Accepted Answer
    No need to be sorry, keep the bugs coming... ;-)

    This looks like a copy/paste bug, where Ormauth uses ORM objects, Simpleauth does not. 

    I've pushed a fix.

    I don't have any apps using Simpleauth, so I'm happy you can provide me feedback.
  • Now it's working perfectly.
    I'm very pleased with your solution.
  • HarroHarro
    Accepted Answer
    Thanks for the feedback !

Howdy, Stranger!

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

In this Discussion