Exemple #1
0
 public function testWithoutPermissions()
 {
     \UsersLogin::logout();
     //
     $route = new HtmlRoute($this->getConfigFixture());
     $route->test($this->getRequestFixture());
     $route->prepareRequest();
     $route->dispatch();
     $this->expectOutputRegex('#cms_auth#');
 }
Exemple #2
0
 public function tearDown()
 {
     parent::tearDown();
     \UsersLogin::logout();
 }
Exemple #3
0
 protected function action()
 {
     if (\UsersLogin::isLogined()) {
         \UsersLogin::logout();
     }
 }
Exemple #4
0
 public function unAuthorize($szUrl = '/')
 {
     $_SESSION[SESSION_AUTH] = array();
     if (!headers_sent()) {
         header('HTTP/1.0 401 Unauthorized');
         header('Content-Type: text/html; charset= utf-8');
         header('Location: ' . $szUrl);
     }
     UsersLogin::logout();
 }
Exemple #5
0
 /**
  *
  * @param unknown $code
  */
 public function confirmEmail($code)
 {
     try {
         $acc = UserAccount::activateEmail($code);
         UsersLogin::logout();
         UsersLogin::forceLogin($acc);
         $this->set('success', '1');
     } catch (Exception $e) {
         $this->set('error', $e->getMessage());
     }
     $this->output('users/registration/confirmEmail');
 }
Exemple #6
0
 public function tearDown()
 {
     if (\UsersLogin::isLogined()) {
         \UsersLogin::logout();
     }
 }