public function act(AutoLogin $auto) { $ds = new DataStore_Memcache(); $ds->setDsn(array('scope' => 'autologin')); $auto->setDataStore($ds); $auto->logout(); return 'redirect:/AutoLoginMemcache'; }
public function filter(AutoLogin $auto) { $startNow = $auto->autoLoginStart(); $this->logined = $auto->isLogined(); $this->loginMessage = $auto->getUserId() . ' is logined!'; if ($startNow) { // Initialize application session values } }
public function act(Session_Login $login, AutoLogin $auto) { if (!$login->login($this->name, $this->password)) { $res->message = 'login failed!'; // for output return 'action:AutoLogin'; } $ret = $auto->login($this->name, $this->auto); return 'redirect:/AutoLogin'; }
public function filter(AutoLogin $auto) { $ds = new DataStore_Memcache(); $ds->setDsn(array('scope' => 'autologin')); $auto->setDataStore($ds); $startNow = $auto->autoLoginStart(); $this->logined = $auto->isLogined(); $this->loginMessage = $auto->getUserId() . ' is logined with memcache!'; if ($startNow) { // Initialize application session values } }
public function act(Session_Login $login, AutoLogin $auto, Result $res) { if (!$login->login($this->name, $this->password)) { $res->message = 'login failed!'; // for output return 'action:AutoLoginMemcache'; } $ds = new DataStore_Memcache(); $ds->setDsn(array('scope' => 'autologin')); $auto->setDataStore($ds); $ret = $auto->login($this->name, $this->auto); return 'redirect:/AutoLoginMemcache'; }
public function act(AutoLogin $auto) { $auto->logout(); return 'redirect:/AutoLogin'; }