This topic is locked
[SOLVED]

Security::getPermissions Not Updating

11/15/2024 6:14:28 PM
PHPRunner General questions
P
pauls99 author

Hello,

I have two PHPRunner projects that I am trying to synchronize. On the first project, I have a link that redirects to an external PHP file (which I will call file 1) that I wrote that includes the dbcommon.php file for my second PHPRunner project. The redirect link uses the external.php script to send a JWT. My external application processes the JWT and, if it passes, calls the Security::loginAs method. This seems to work, however this external application then POSTs data to a different URL (file 2), which also includes the second PHPRunner's dbcommon.php. I would expect file 2 to see table permissions because file 1 logged in and they both include the same dbcommon.php file, but when I run Security::getPermissions("tableName"), this comes up blank. It is not until I open a new tab and navigate to a URL in my second project that the the table permissions come up correctly and my POST data is processed as expected. I am not sure if I understand how these all interact, what might I be missing that makes this not work?

Thank you!

Sergey Kornilov admin 11/16/2024

You need to explain what "project synchronization" is. This is not something that I hear often.

P
pauls99 author 11/19/2024

By "synchronize" I just meant that I wanted to be able to log in to one project, and if that succeeded log into my second project (they share the same users database).

C
copper21 11/19/2024

Look at Session Control in the manual.

https://xlinesoft.com/phprunner/docs/session_keys.htm

P
pauls99 author 11/22/2024

I will look into that, thanks!