PHP Classes

Authorized State of User?

Recommend this page to a friend!

      dm.KittenAuth  >  All threads  >  Authorized State of User?  >  (Un) Subscribe thread alerts  
Subject:Authorized State of User?
Summary:Trying to figure out how to apply this in form handling
Messages:2
Author:Kim Gokce
Date:2008-02-20 22:46:18
Update:2008-02-21 22:17:04
 

  1. Authorized State of User?   Reply   Report abuse  
Picture of Kim Gokce Kim Gokce - 2008-02-20 22:46:18
Very nice class and something I've been looking for a long time. What I'm wondering is how the processing can report the authorization status of session.

That is to say when I chose to use the dispatcher for authorized and nonauthorized to return to the same form handling file (contact us type form), I don't realize how to distinguish the result (authorized vs not). The class will report to the browser "authorized" or "unauthorized" in the non-dispatched cases but I was expecting to find a way to apply this outcome to a conditional like this pseudo code:

if (Authorized) email(); else invalidattempt();

Sorry if this is not clear but I am new at the use of class and object structures and probably I am overlooking the obvious to a more trained eye.

  2. Re: Authorized State of User?   Reply   Report abuse  
Picture of Richard Munroe Richard Munroe - 2008-02-21 22:17:04 - In reply to message 1 from Kim Gokce
Piece of cake. When you use the setAuthorizedInSession/setNotAuthorizedInSesson, just specify a query string, e.g.:

setAuthorizedInSession('example.php?authorized=1', true) ;

or

setAuthorizedInSession('example.php?authorized=0', true) ;

as necessary for your code to do the right thing.

Best,

Dick Munroe