Is this form generated with the form generator? If yes, create a new hidden field and use this insert tag as its valueHowever, this data could be altered by someone. If you want to find out the username in your script (import/iMatches.php), then you need to add the following to the top of your script:
PHP Code:
// Initialize the system
define('TL_MODE', 'FE');
require __DIR__ . '/system/initialize.php';
And then use
PHP Code:
if( \Contao\FrontendUser::getInstance()->authenticate() )
{
… \Contao\FrontendUser::getInstance()->username …
}
Bookmarks