public function testCheckLoggedIn1()
 {
     $this->assertEquals(FALSE, fAuthorization::checkLoggedIn());
     $acls = array('news' => array('*'), 'events' => array('read'));
     fAuthorization::setUserACLs($acls);
     $this->assertEquals(TRUE, fAuthorization::checkLoggedIn());
 }
Ejemplo n.º 2
0
                    $permissions['franchise'][] = 'edit';
                    break;
                case 33:
                    $permissions['franchise'][] = 'delete';
                    break;
            }
        }
        $tmp = UserRegion::getByIdUser($u->prepareIdUser());
        $regions = array();
        foreach ($tmp as $item) {
            $regions[] = $item->prepareIdRegion();
        }
        $regions = implode(',', $regions);
        fSession::set(SESSION_ID_USER, $u->prepareIdUser());
        fSession::set(SESSION_REGIONS, $regions);
        fAuthorization::setUserACLs($permissions);
        header('Location: ' . SITE);
    }
}
?>
<!DOCTYPE html>
<html>
	
	<head>
	
		<title>Login</title>
		
		<link type="text/css" rel="stylesheet" href="<?php 
echo CSS;
?>
login.css" media="all" />