This topic is locked

Filter List Page

3/1/2011 7:03:53 PM
PHPRunner General questions
C
carlos author

I am very interested in the issue of filtering data. I read several posts where people speak of it linked to "SESSION", but I did a test using the Process Before event and not achieve my purpose.
I would like to filter the records by user, ie, each user only sees the records created by him self. The application does not perform user registration but use the same data base, joins to the SESSION of site where it is used. Is this possible?
Thanks for the help in advance.

Admin 3/2/2011

First option is to use 'Users can see and edit their own data only' security mode:

http://xlinesoft.com/phprunner/docs/advanced_security_settings.htm
Another option is to modify SQL Query on the fly using events:

http://xlinesoft.com/phprunner/docs/modify_sql_query_on_the_fly.htm

C
carlos author 3/2/2011

Grateful for the two recommendations. After studying the alternative I think what I need is closer to the second option.
The problem I had was that when loading session I found a error page because there were two sessions started. I make a print of the session variables and check that a session had already begun and that it does not incorporate the data I need.
I try to be as clear as possible for you not waste time.
I'm trying to incorporate the application made in PHPRunner within a PHP application that already has its own session variable and as part of the process I must recover the user of this application $_SESSION ["user_login"]. Always using the same database. As I can do?
It could be something?

WHERE user=".$_SESSION ["user_login"]"
Thanks for the help in advance.

Admin 3/3/2011

Yes, something like this might work.
Assuming that user is a text field:



" WHERE user='".$_SESSION ["user_login"] . "'"
C
carlos author 3/3/2011

Thanks Sergey, but as recovery the session of the application that load the PHPRunner application. I only need 1 value of that session, the user name.
Is it possible to transfer a value in the other session to session PHPRunner?
I have a PHP form that takes the value of user (user_login) and save it as a record field and in List Page I need to filter to show only the records for that user. The difficulty is to me when I can not make up that session variable on pages made PHPRunner, but I have the certainty that the solution is simple ... just I do not see it :-)

Admin 3/3/2011

It really depends on how these two applications collaborate. By default sessions are shared between PHP apps on the server however if applications belong to different subdomains or PHPRunner application is accessed via iframe sessions may not be shared.
If you have a valid support contract contact support team directly providing the way to access this application on your server.