All menu items appear

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sclg
User
Posts: 149
Location: UK

All menu items appear

Post by sclg »

I have a working app in v2021 which I'm upgrading to v2024.
There are 4 logins with 4 (static) user levels. Each user level allows more and more of the menu structure to be used.
This works fine in 2021. The lowest level login only display one menu item and so on up through the higher levels.

However, in v2024, it doesn't matter which login I use, almost ALL the menu items appear and I can do almost ANYTHING at any level. Even permissions that are not enabled for a particular level are ignored.
Users table and user levels are setup correctly and haven't changed from the older, working version.
All the access options for each user level are setup correctly and haven't changed from the older, working version.

On investigating further, by putting $header = CurrentUserLevel(); in a Page_DataRendering, I find that the User Level is ALWAYS 1 whichever login is used.
The user table is correct....

id    user   password    userlevel
4	ro	$2y$10xxx	2
5	club_admin	$2y$10xxx	1
6	league_admin	$2y$10xxx	3
7	rangereg	$2y$10xxx	4

.... this is exactly how they are defined on the advanced security page....
Anonymous
Administrator
Default
club_admin
ro
league_admin
rangereg

So current user level is not being set correctly when you login.
Is there something I've missed in the update that needs doing?
Any ideas please...


mobhar
User
Posts: 11727

Post by mobhar »

You may change your code to:

$header = "Current User Level: " . CurrentUserLevel() . "<br />Current User Name: " . CurrentUserName() . "<br />";

to ensure which username you are currently using.


Post Reply