Call to undefined function in custom file

Hy All,I’m testing PhpMaker 2023, (I went from v2018 so maybe this is a stupid question)I’ve added a Custom File with “Include Common files” and as suggested I included an external file.php instead of saving the code in the project.Well if I add in the prject - page content this code:

<?php
echo CurrentUserID();
?>

It works, but if I use the same code in the included file.php I get the error: Call to undefined function CurrentUserID()Why?

Note the PHP namespace of the project.

I’ve to define namespace in the included file too?

You should add the same namespace to your include file.

Thanks a lot, now it works!