Hi, i had some code inside the authentication class in Joomla 3.7.3
When i upgrade to joomla 3.8.2 i'm trying to add this code in the same place but it doesnt run:
the code is:
include_once(dirname($_SERVER['DOCUMENT_ROOT']) . DIRECTORY_SEPARATOR .ROOT_PATH."/usuario/TUsuario.php");
$usuario= new TUsuario();
$usuario->.....etc
the error that appear are "cannot redeclare class", "Class 'Joomla\CMS\Authentication\TUsuario' not found in ...../libraries/src/Authentication/Authentication.php".
I suppose there is a new way of doing this kind of including, could anybody help me please?.
Thanks
Do custom tasks inside the function authenticate()
error of custom class not found
Joomla 3.8.2
Php 5.6
This way of doing the include runs in Joomla 3.7.3
Title |
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-11-21 15:59:31 |
Closed_By | ⇒ | mbabker |
What you're doing is in essence core hacking. I don't think anyone here is going to give information on how to successfully do that in an update safe way (because there isn't one).
Use the plugin system the way it was designed to add your custom logic, do not core hack the core authentication handler.
Closing, not a core issue.
code.txt
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18781.