CLEAN: How about changing the rest of the files with your variable? :p
[phorkie.git] / www / user.php
1 <?php
2 /**
3  * Edit user information
4  */
5 namespace phorkie;
6 $securityLevel = '1';
7 require_once 'www-header.php';
8
9 if (isset($_POST['name'])) {
10     $_SESSION['name'] = substr(filter_var($_POST['name'], FILTER_SANITIZE_STRING), 0, 35);
11 }
12
13 if (isset($_POST['email'])) {
14     $_SESSION['email'] = substr(filter_var($_POST['email'], FILTER_SANITIZE_EMAIL), 0, 35);
15 }
16
17 render(
18     'user',
19     array(
20         'identity' => $_SESSION['identity'],
21         'name'     => $_SESSION['name'],
22         'email'    => $_SESSION['email']
23     )
24 );
25 ?>