Ejemplo n.º 1
0
 public function login(AIS2Connection $connection)
 {
     assert($this->cookie !== null);
     if ($this->loggedIn) {
         return false;
     }
     $connection->addCookie('cosign-filter-ais2.uniba.sk', $this->cookie, 0, '/', 'ais2.uniba.sk');
     $data = $connection->get(self::LOGIN);
     if (preg_match('@\\<title\\>IIKS \\- Prihlásenie\\</title\\>@', $data)) {
         return false;
     }
     $this->loggedIn = true;
     return true;
 }
Ejemplo n.º 2
0
 public function logout(AIS2Connection $connection)
 {
     $connection->clearCookies();
     $this->loggedIn = false;
     return true;
 }
Ejemplo n.º 3
0
 public function logout(AIS2Connection $connection)
 {
     $connection->post(self::COSIGN_LOGOUT, array('verify' => 'Odhlásiť', 'url' => self::MAIN_PAGE));
     return parent::logout($connection);
 }