Thanks again and some more questions.
Thankyou. That is now fixed, but it was easier at this stage to delete all the files and change the values in the preset.
I now have more problems:
I have a rule called "is treasurer" that states
restrict if <?php echo $_SESSION['level'] <> "treasurer";?>
allow if <?php echo $_SESSION['level'] = "treasurer";?>
The idea being only to show the tab if the user is a treasurer.
This rule is applied to a tabbed panels tab to control a show region behaviour as follows:
<?php if(WA_Auth_RulePasses("is treasurer")){ // Begin Show Region ?>
<li class="TabbedPanelsTab" tabindex="0">Treasurers</li>
<?php } // End Show Region ?>
This fails because the login page does not send a value for the session variable $_SESSION['level'] as is proved by running the statement <?php session_start() ;Print_r($_SESSION); ?>, on the landing page, the output of which is:
Array ( [WAENCRYPTEDRETURNUSED] => [WAENCRYPTEDRETURNSUCCESS] => [SecurityAssist_usr_id] => 49 ) even though the session box shows the Session ['level'] is available , it is obviously not set.
The page to which the login page redirects did not have a recordset containing the user's level, so I used the SecurityAssist_usr_id session variable to select the level of the user in a new record set, and changed the rule as follows:
restrict if "treasurer" <> <?php echo $row_levelset['level']; ?> (do not show the panel if the level is not equal to the string "treasurer")
allow if "treasurer" = <?php echo $row_levelset['level']; ?> (show the panel if the level is equal to the string "treasurer" )
I tried it with all variations of inverted commas around the word treasurer with the same results. No matter what level of user I select, the region does not show even when the page prints the value of the level variable as being "treasurer".
I thought that the idea should work, but cannot determine why it does not.
Questions:
1.Is it not possible to set the session['level'] variable + others in the login page. If so, how?
3. How do the groups work? The system show how to create groups, but I cannot see how to use them, much less how to compare them with a the group that a user could belong to that has to be in a database.
Sorry to be a pain, but it is really a problem.