Please Log in to join the conversation.
That's a Joomla trigger so you'll need to check Joomla's documentation.If I use the trigger joomla_onRenderModule, can you tell me what are the variables used ?
Please Log in to join the conversation.
global $_CB_framework;
$decryptedValue = (int) (new \Joomla\CMS\Encrypt\Aes($_CB_framework->getCfg('secret') . ':a2xdt7zx'))->decryptString('[get_token]');
if ($decryptedValue === null || $decryptedValue === 0) {
return 1444;
} else {
return $decryptedValue;
}
Please Log in to join the conversation.
rtrim( strtr( $encryptedValue, '+/', '-_' ), '=' );
strtr( '[get_token]', '-_', '+/' );
Please Log in to join the conversation.
Encrypt token :
global $_CB_framework;
$encryptedValue = new \Joomla\CMS\Encrypt\Aes( $_CB_framework->getCfg( 'secret' ) . ':a2xdt7zx' ) )->encryptString( (string) \CBLib\Application\Application::MyUser()->getUserId();
$token = rtrim( strtr( $encryptedValue, '+/', '-_' ), '=' );
$user->set( 'cb_token_api', ( $token ) );
$user->store();
Decrypt user :
global $_CB_framework;
$token = strtr( '[get_token]', '-_', '+/' );
$decryptedValue = (int) (new \Joomla\CMS\Encrypt\Aes($_CB_framework->getCfg('secret') . ':a2xdt7zx'))->decryptString($token);
if ($decryptedValue === null || $decryptedValue === 0) {
return 1444;
} else {
return $decryptedValue;
}
Please Log in to join the conversation.
Please Log in to join the conversation.