Hello,
I want to override a function in the ‘SAML2AuthenticateUser’ class. I already tried this:https://community.suitecrm.com/t/how-to-override-emailman-class-function/68559/10 , but it’s not working. I want to override the function ‘authenticateUser’.
<?php
$customBeanList['User'] = 'SAML2AuthenticateUser';
$customBeanFiles['User'] = 'custom/modules/User/authentication/SAML2Authenticate/SAML2AuthenticateUser.php';
?>
<?php
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
require_once 'modules/Users/authentication/SAML2Authenticate/SAML2AuthenticateUser.php';
class CustomSAML2AuthenticateUser extends SAML2AuthenticateUser
{
public function authenticateUser($name, $password, $fallback = false, $checkPasswordMD5 = false)
{
$GLOBALS['log']->error('CustomSAML2Authentication');
return '';
}
}
I did a build and repair, no errors, but unfortunately I am not going through this function.
Anyone any idea, or is it just not possible to overwrite this function?