This topic is locked

allow user to jump between two projects

7/2/2008 8:58:30 AM
PHPRunner General questions
hfg author

I have two projects which are based on two differant databases. The usernames and passwords are the same for both porjects. I would like for my users to be able to use links in the individual projects to jump back and forth so they don't have to sign out of one and then sign into the other.
I have successfully set it up so the users can jump back and forth without having the sign out/in and the permissions are working for which tables, views and reports the user can see (the permission groups are also the same"
Where I am running into a problem is with getting it so they can see their data. For the most part I use "users and see and edit their own data only" When the sign into Project A this is true, but when the jump to the other project they get no data (even though the username is the same).
The owner IDs for both projects are the same (using Username). I guess the 1st question is, is this even possible?
Is there a way to see what the sesssion variables are once a user has logged in? This would help me figure out what the system is using.
Thanks

J
Jane 7/2/2008

Hi,
for debugging purpose print all $_SSSION variables:

print_r($_SESSION);


Regarding your problem.

You need to fill $_SESSION variables for both projects in the event.

Here is a sample:

if ($_SESSION["_tablename_OwnerID"])

$_SESSION["_anothertablename_OwnerID"] = $_SESSION["_tablename_OwnerID"];

hfg author 7/2/2008

Jane,
Thanks, that is very helpful.
Where should I put the second set of code at - Login or somewhere else?
I used the session print already and that really helps me understand how the system is working.

J
Jane 7/3/2008

Hi,
for example you jump from tablename1_list page to tablename2_list page.

In this case add above code to the List page: Before process event for tablename2 table.

hfg author 7/3/2008

Worked perfectly, thanks for the help