I have a User table in which Users are given an Access Level Between 1 to 5. These levels correspond to levels in another table. It it possible to limit a user whose access level is 3 to only see the entries in the other table which contain access level of 3 or less and for person with an access level of say 4 so they can see all records values 4 and below i.e. 4, 3, 2 and 1?
Page 1 of 1
Limiting User Access How do I limit User Access Levels
#2
Posted 09 February 2010 - 02:46 AM
Two step process
1. Use AfterSuccessfulLogin event to save access level in session variable
2. Use BeforeSQLQuery event to modify WHERE clause:
More info:
http://xlinesoft.com...n_variables.htm
http://xlinesoft.com..._on_the_fly.htm
1. Use AfterSuccessfulLogin event to save access level in session variable
$_SESSION["level"] = $data["AccessLevel"];
2. Use BeforeSQLQuery event to modify WHERE clause:
$strWhereClause = whereAdd($strWhereClause, "AccessLevel >= " . $_SESSION["level"]);
More info:
http://xlinesoft.com...n_variables.htm
http://xlinesoft.com..._on_the_fly.htm
Best regards,
Sergey Kornilov
Sergey Kornilov
#5
Posted 10 February 2010 - 10:47 PM
admin, on 09 February 2010 - 02:46 AM, said:
Two step process
1. Use AfterSuccessfulLogin event to save access level in session variable
2. Use BeforeSQLQuery event to modify WHERE clause:
More info:
http://xlinesoft.com...n_variables.htm
http://xlinesoft.com..._on_the_fly.htm
1. Use AfterSuccessfulLogin event to save access level in session variable
$_SESSION["level"] = $data["AccessLevel"];
2. Use BeforeSQLQuery event to modify WHERE clause:
$strWhereClause = whereAdd($strWhereClause, "AccessLevel >= " . $_SESSION["level"]);
More info:
http://xlinesoft.com...n_variables.htm
http://xlinesoft.com..._on_the_fly.htm
Thank you for that. Tried it on version 5.2 and its working great thank you!
Page 1 of 1

Sign In
Register
Help


MultiQuote