This topic is locked

$_SESSION['GroupID'] return Null with dynamic permissio

8/5/2008 4:04:50 AM
PHPRunner General questions
L
laurent author

I set up the dynamic permissions (with PHPR 4.2 Build 379) that work fine but the $_SESSION["GroupID"] return Null value.

I looked with PHPMyAdmin the table ..._ugmembers that have record displaying correctly the UserName (that I can also display correctly in a page using $_SESSION["UserID"]) and its corresponding GroupID that is an Integer type: -1 for admin, etc...but the $_SESSION["GroupID"] does not diplay anything.
Also my _User table contains a field User_Name (VAR type) that correspond well to the $_SESSION["UserID"] and contains a field GroupID (INT Type) but this field is not automatically populated by PHPR and is Null value for all _User records.
What are the steps to correctly setup the GroupID field with dynamic permissions so the $_SESSION["GroupID"] returns the value of the login user GroupID?
Thank you.

J
Jane 8/5/2008

Laurent,
please make sure you've assigned users to the corresponding security groups on the Assign users to groups page.

L
laurent author 8/5/2008

Laurent,

please make sure you've assigned users to the corresponding security groups on the Assign users to groups page.


Thanks for your reply but:
Yes I have done this prior to my post: as I said the dynamic permisions works fine the only thing that does not work for me is the $_SESSION["GroupID"] and the fact that my _User table does have its GroupID (Type INT) filled with NULL values instead of the corresponding GroupID value (which is present in the ..._ugmembers table)
When you setup the dynamic permissions you only have to mention which table is for username and password, in my case: _User

and the Username field in this table, in my case: User_Name

and the password field in this table.
My table ..._ugmembers contains the correct UserName, GroupID value for each user. So why $_SESSION["GroupID"] does not return any value?

Do you have to create a GoupID field (INT type) in the _User table as well?

If yes do I have to regenerate (and how) my existing users so the table _User populates itself with the corresponding GroupID value?

J
Jane 8/5/2008

Laurent,
It's difficult to tell you what's happening without seeing actual files.
Please zip and send to support@xlinesoft.com a ful set of generated files along with database creation script for investigation.

L
laurent author 8/5/2008

Laurent,

It's difficult to tell you what's happening without seeing actual files.
Please zip and send to support@xlinesoft.com a ful set of generated files along with database creation script for investigation.


Jane,
Thanks. I will send you the project file ASAP.

Also note that I am not using the New User Registration page in my config (setup new user from table myself)
However could you please answer this general setiing/setup questions regarding dynamic permissions:
When you setup the dynamic permissions you only have to mention which table is for username and password, e.g.: _User

and the Username field in this table, e.g.: User_Name

and the password field in this table.

  1. Is there anything else to setup (According to the PHPR Help there is no need)? YES/NO?
  2. For example: Do you have to create a GoupID field (INT type) in the _User table as well? YES/NO?
  3. If yes do I have to regenerate (and how) my existing users so the table _User populates itself with the corresponding GroupID value? YES/NO?
    Thanks.

J
Jane 8/5/2008

Laurent,

1. Is there anything else to setup (According to the PHPR Help there is no need)?

NO

2. For example: Do you have to create a GoupID field (INT type) in the _User table as well?

NO

3. If yes do I have to regenerate (and how) my existing users so the table _User populates itself with the corresponding GroupID value?

NO

T
thesofa 8/5/2008

Nice one, short and to the point...