lonnieezell / myth-auth

One-stop Auth package for CodeIgniter 4
MIT License
632 stars 207 forks source link

Call to a member function generateResetHash() on array #583

Closed Panipan-id closed 1 year ago

Panipan-id commented 1 year ago

Hello,

I have an issue regarding forgot password, can you help? and how to fix it? image

Thank you

manageruz commented 1 year ago

Hi @Panipan-id Can you show me result of your dd($user)? And show me your user model please. It seems your user model returning array, by default it should return user entity. Have you modified the code? And version of myth:auth please.

manageruz commented 1 year ago

More info will be useful to solve your problem

Panipan-id commented 1 year ago

Hi thankyou @manageruz,

Thanks for the reply, I've fixed it and it's running normally. And I have one question, Can I create my own model using data from myauth? for example like getting user data.

Thank you

manageruz commented 1 year ago

Yes you can create your own model using data from myth auth. The best way to mofidy it is extending it. Good luck

Panipan-id commented 1 year ago

Do I need to delete the entity and its model? , or can I just create a model directly?

manageruz commented 1 year ago

No you shouldn't delete any code directly in myth auth. Instead just extend it and you can modify it as you want

Panipan-id commented 1 year ago

Ok thanks , I will try it

manageruz commented 1 year ago

Closing as solved. If you have any questions feel free to open new topic on discussions.