arahn
02-25-2000, 08:47 PM
ˇHola!
I want some "hard authed" pages on my site and some "soft authed" in which any user can enter and browse, beeing default logged as "nobody". I'm using PHPLIB. All the classes are expanded and ready. auth class is expanded to a default_auth class in where nobody=true. The cookie is programmed to last for a month.
Then, in the soft-authed pages i put:
[nbsp][nbsp] page_open(array("sess" => "xfreefriends_Session",
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] "auth" => "xfreefriends_Default_Auth"));
Then, in the hard-authed page(s) i put:
page_open(array("sess" => "xfreefriends_Session",
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]"auth" => "xfreefriends_Auth"));
$auth->login_if($auth->auth["uid"] == "nobody");
The front page uses soft-auth. So, when a user enters it must remember if the user is logged in or it's in as nobody. In the first case, it must show a greeting for the user and hide the "subscribe" option from the top menu bar.
Then, in the second case, it would not show any greeting, and give the option to subscribe on the menu.
It works when the user logs on and then returns to the f.p., but if the user closes the broswer and returns, again the system doesn't remember which user it is and shows the menu bar for the unlogged user...
In resume --- despite all the bloat of explanations i've done so far: Which is the mechanism for implementing such a policy of access? How it's done?
TYA
Alfredo
I want some "hard authed" pages on my site and some "soft authed" in which any user can enter and browse, beeing default logged as "nobody". I'm using PHPLIB. All the classes are expanded and ready. auth class is expanded to a default_auth class in where nobody=true. The cookie is programmed to last for a month.
Then, in the soft-authed pages i put:
[nbsp][nbsp] page_open(array("sess" => "xfreefriends_Session",
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp] "auth" => "xfreefriends_Default_Auth"));
Then, in the hard-authed page(s) i put:
page_open(array("sess" => "xfreefriends_Session",
[nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp][nbsp]"auth" => "xfreefriends_Auth"));
$auth->login_if($auth->auth["uid"] == "nobody");
The front page uses soft-auth. So, when a user enters it must remember if the user is logged in or it's in as nobody. In the first case, it must show a greeting for the user and hide the "subscribe" option from the top menu bar.
Then, in the second case, it would not show any greeting, and give the option to subscribe on the menu.
It works when the user logs on and then returns to the f.p., but if the user closes the broswer and returns, again the system doesn't remember which user it is and shows the menu bar for the unlogged user...
In resume --- despite all the bloat of explanations i've done so far: Which is the mechanism for implementing such a policy of access? How it's done?
TYA
Alfredo