示例#1
0
 public function act(AutoLogin $auto)
 {
     $ds = new DataStore_Memcache();
     $ds->setDsn(array('scope' => 'autologin'));
     $auto->setDataStore($ds);
     $auto->logout();
     return 'redirect:/AutoLoginMemcache';
 }
示例#2
0
文件: Login.php 项目: nishimura/laiz
 public function filter(AutoLogin $auto)
 {
     $startNow = $auto->autoLoginStart();
     $this->logined = $auto->isLogined();
     $this->loginMessage = $auto->getUserId() . ' is logined!';
     if ($startNow) {
         // Initialize application session values
     }
 }
示例#3
0
文件: Login.php 项目: nishimura/laiz
 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';
 }
示例#4
0
 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
     }
 }
示例#5
0
 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';
 }
示例#6
0
文件: Logout.php 项目: nishimura/laiz
 public function act(AutoLogin $auto)
 {
     $auto->logout();
     return 'redirect:/AutoLogin';
 }