Example #1
0
 public function testWithoutPermissions()
 {
     \UsersLogin::logout();
     //
     $route = new HtmlRoute($this->getConfigFixture());
     $route->test($this->getRequestFixture());
     $route->prepareRequest();
     $route->dispatch();
     $this->expectOutputRegex('#cms_auth#');
 }
Example #2
0
 public function tearDown()
 {
     parent::tearDown();
     \UsersLogin::logout();
 }
Example #3
0
 protected function action()
 {
     if (\UsersLogin::isLogined()) {
         \UsersLogin::logout();
     }
 }
Example #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();
 }
Example #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');
 }
Example #6
0
 public function tearDown()
 {
     if (\UsersLogin::isLogined()) {
         \UsersLogin::logout();
     }
 }