maybe try this:

function login() {    
        if (($this->Auth->user() ) && 
!($this->Session->read('Auth.User.online'))){
     
            $this->Session->write('Auth.User.online', true);
            $this->Session->write('Auth.User.host', {function of your 
choice});
            $this->redirect($this->Auth->redirect());
        }       
    else
    {a message/action to notify the user is logged in already)
    }

when the user logouts, the session is destroyed, or it timeouts when 
user closes the browser (after time dependent on your Config::Security 
setting)

you could extend the user model with i.e. "last_login" field to control 
how often can the user login.

Perhaps this is not the best way to do this, but it just crossed my mind.
HTH



Marojahan M.T. Sigiro pisze:
> supposed i want to build an application that only permit a user only 
> login once in a time.
>
> how to check the users session to ensure that a user currently offline 
> or already use the application from a certain host?
>
> -- 
> ---
> I Don't Know Who/What I Am Yet, But I Know Who/What I Am Not!
> --------------------------------------
> Marojahan M.T. Sigiro
> [email protected] <mailto:[email protected]>
> GTalk : marojahan
> Y! : ojak_s
> http://ojakaja.com
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to