allow people to logout and login in secure mode
[phorkie.git] / www / user.php
1 <?php
2 /**
3  * Edit user information
4  */
5 namespace phorkie;
6 require_once 'www-header.php';
7
8 if (isset($_POST['name'])) {
9     $_SESSION['name'] = substr(filter_var($_POST['name'], FILTER_SANITIZE_STRING), 0, 35);
10 }
11
12 if (isset($_POST['email'])) {
13     $_SESSION['email'] = substr(filter_var($_POST['email'], FILTER_SANITIZE_EMAIL), 0, 35);
14 }
15
16 render(
17     'user',
18     array(
19         'identity' => $_SESSION['identity'],
20         'name'     => $_SESSION['name'],
21         'email'    => $_SESSION['email']
22     )
23 );
24 ?>