I'm trying to redefine the changepassword function in /datamodel/2.x/authent-local/model.x.x.php using a custom extension so that I don't modify the file directly.
can anyone help me, because I tried using xml, the error "module not found" always appears, even though I have filled the dependencies with "authent-local/3.0.2".
Can anyone help me how to redefine the php function?
Thank you for your reply, to be clear, I want to redefine the function in the "UserLocal" class so that when the password has expired the user cannot use the same password when changing the password, if the password is the same as the old one then the change password will fail,
previously I have created an extension so that when the user expires automatically when logging in will be asked to change the password.
Is there any alternative to redefine the function in the class?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm trying to redefine the changepassword function in /datamodel/2.x/authent-local/model.x.x.php using a custom extension so that I don't modify the file directly.
can anyone help me, because I tried using xml, the error "module not found" always appears, even though I have filled the dependencies with "authent-local/3.0.2".
Can anyone help me how to redefine the php function?
Here I attach the file that I want to redefine,
thank you
I don't think you can override them, if I remember correctly, they were hard coded.
What are you trying to accomplish exactly?
Hii Jef,
Thank you for your reply, to be clear, I want to redefine the function in the "UserLocal" class so that when the password has expired the user cannot use the same password when changing the password, if the password is the same as the old one then the change password will fail,
previously I have created an extension so that when the user expires automatically when logging in will be asked to change the password.
Is there any alternative to redefine the function in the class?
Thanks
The better approach is https://www.itophub.io/wiki/page?id=2_7_0%3Afeature%3Apassword-policy
hii Jef,
Thanks for the reply, I'll try and find out more.
It means that the UserLocal class cannot be redefined, using xml or php, unless it is directly edited in the core file.
Which would not be recommended at any point.
sorry I was wrong, still not successful hehe 🙏🙏🙏
Last edit: barakbar 2022-12-09