trying to port web app starter from PHP
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!User::IsSignedIn()) {
|
||||
header('Location: '.URL::link('account/login'));
|
||||
exit;
|
||||
}
|
||||
$u = User::$current_profile;
|
||||
?><!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Profile</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Profile</h1>
|
||||
<p>Email: <?php echo htmlspecialchars($u['email']); ?></p>
|
||||
<p>Roles: <?php echo htmlspecialchars(implode(', ', $u['roles'] ?? [])); ?></p>
|
||||
<p>Created: <?php echo htmlspecialchars(date('c', $u['created'] ?? time())); ?></p>
|
||||
<p><a href="<?= URL::link('account/logout') ?>">Logout</a></p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user