Menu

Redefine Functions in Userlocal class

barakbar
2022-12-08
2022-12-09
  • barakbar

    barakbar - 2022-12-08

    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

     
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2022-12-08

    I don't think you can override them, if I remember correctly, they were hard coded.

    What are you trying to accomplish exactly?

     
  • barakbar

    barakbar - 2022-12-09

    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

     
  • barakbar

    barakbar - 2022-12-09

    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.

     
    • Jeffrey Bostoen

      Jeffrey Bostoen - 2022-12-09

      Which would not be recommended at any point.

       
  • barakbar

    barakbar - 2022-12-09

    sorry I was wrong, still not successful hehe 🙏🙏🙏

     

    Last edit: barakbar 2022-12-09

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.