Hello,
I have a project built with PHPMaker 2024 which works perfectly. To keep the codebase aligned with future updates, I’m migrating it to PHPMaker 2025.
However, I noticed a change in behavior. In version 2024, inside the User_LoggedIn(string $userName)
event, I could assign the value of CurrentUserID()
to a session variable without any issue.
Example:
function User_LoggedIn(string $userName): void
{
$_SESSION["help"] = $userName;
$_SESSION["help2"] = CurrentUserID();
}
Then, in the default page after login, I use this:
public function pageDataRendering(string &$header): void
{
$header = "help = " . $_SESSION["help"] . "<br>";
$header .= "help2 = " . $_SESSION["help2"] . "<br>";
$header .= "help3 = " . CurrentUserID();
}
The result is:
help = danilo.macri
help2 = [empty]
help3 = 214898
So:
- The session variable
help
correctly receives the username. - The session variable
help2
is empty — even though it should be set toCurrentUserID()
. - The call to
CurrentUserID()
in the page works fine.
In PHPMaker 2024, this code worked as expected. In PHPMaker 2025, CurrentUserID()
seems not to return a valid value at that stage in the login process.
Is this an intentional change in behavior for the User_LoggedIn
event? Or is there a new way to get the user ID immediately after login?
N.B. The issue is not related to the use of $_SESSION[]
instead of Symfony’s session management. The problem persists regardless of whether native PHP sessions or Symfony sessions are used.
Thank you for your help.