Re: Login script and posting

Dan Rossi <liveuser-zu2dZaOKXTSc5qR/[email protected]>
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
On 21/06/2005, at 6:18 PM, Dan Rossi wrote:

>
> On 21/06/2005, at 5:53 PM, Lukas Smith wrote:
>>
>> thats why i dont like event based programming.
>> anyways you can get the liveuser instance inside your event handler. 
>> so you should be able to modify the observers inside any event. at 
>> the same time you could store some property inside your observers to 
>> handle this.
>>
>> here are the docs for the event dispatcher
>> http://pear.php.net/manual/en/package.event.event-dispatcher.php
>>
>>
>
> Yeh i get how it works, I have two differen classes, maybe the way I 
> do it is bending the rules as always ! I have run into issues now, I 
> got my login script which is used for posting, it executess the 
> onLogin method which then does a redirect to index.php. However my 
> index.php is running a different events class, the login is expiring 
> somehow so is forcing a login there. And then on the login events 
> class its calling onUnfreeze coz i've already logged in !
>
> Maybe the init function is not for me and I should use a login method 
> instead to post the login details then redirect somewhere ? Coz its 
> limitation is that its posting to PHP_SELF.
>

Yep the login event class is calling onUnfreeze instead of onLogin 
randomly until i clear my session cookie, then the other events class 
is calling forceLogin after i redirect to it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.