I have been struggling with a %udat problem for a while without luck. I
am using %udat to store user id's when a user is logs on, and then
testing for the ID in later pages. However, it only works, 50% of the
time. I can log in, and look a a few pages, then I get a not-logged-in
error. If I reload, I am OK for a page or two before getting the next
log-logged-on error. I suspect there is a problem with caching or
closure (based on previous discussions on this list), but I don't see it
where the problem is.
Here is some code:
On pages that need a log in, I do this:
[- Execute ('require-login.epl') -]
and here is require-login.epl:
[$ if $udat{uid} $]
[- $user = App::Data::Users->retrieve(uid=>$udat{uid});
# using Class::DBI
-]
<P> You are logged in as [+ $user->firstname +]
[+ $user->lastname +] </P>
[$ else $]
[- $r = shift;
$r->DeleteSession;
-]
[- $http_headers_out{'Location'} =
"login-fail.html" -]
[$ endif $]
Thanks,
--
Eric Freed
IT Manager
New Rochelle Radiology
914-633-7700 x339
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]