[Phplib-users] Mixing Authenticated & unauthenticated Pages
Brought to you by:
nhruby,
richardarcher
From: T. R. <Te...@Te...> - 2003-08-18 15:15:36
|
Thanks all for your help with my revalidation problems! I'm very glad to be beyond that, now I'm moving ahead and making new mistakes. (the only way real progress is ever made!) I'm trying to mix authenticated & "anonymous/nobody" scripts. I include() a menu in the left hand gutter of every page. If you're logged on with user permissions, you get one menu, admin - you get another. If you haven't logged on at all, you only see a log in form. (pretty basic stuff) Items across the top navigation bar of the page don't require authentication. To handle those pages, I created a second subclass of Auth called defaultAuth that sets $nobody to true. If I open a non-privileged page, like say contacts.php - the left-hand menu disappears. OK - that makes sense, the defaultAuth is active and not my customAuth class. In a moment of misguided clarity, I added a page_open() in the left navigation that uses my customAuth class. Great! Now I can see the left hand menu when I'm on a page that uses defaultAuth. Wait just a second boy-genius! - Now users who haven't logged on yet are forced to log on when that left nav is executed during the include(). Ahhh, the law of unintended consequences bites me in the rump again! Anyone got any tips they'd like to share for mixing authentication modes? Thanks in advance, Terry |