2018-11-09 15:16:36 +01:00
|
|
|
<?php
|
|
|
|
include $_SESSION["docroot"].'/php/classes.user.php';
|
|
|
|
$user = new user;
|
2018-11-20 13:53:17 +01:00
|
|
|
if($_GET["function"]!="new"){
|
2018-11-09 15:58:00 +01:00
|
|
|
$user->get_info($_COOKIE["token"]);
|
|
|
|
}
|
2018-11-20 13:53:17 +01:00
|
|
|
|
2018-11-20 09:59:59 +01:00
|
|
|
switch ($_GET["function"]) {
|
2018-11-09 15:16:36 +01:00
|
|
|
case 'change-pw':
|
|
|
|
$user->change_password($_POST["current"], $_POST["new"]);
|
|
|
|
break;
|
|
|
|
|
2018-11-20 13:53:17 +01:00
|
|
|
case 'new':
|
2018-11-09 15:58:00 +01:00
|
|
|
$user->new($_POST["username"], $_POST["passwd"]);
|
|
|
|
break;
|
|
|
|
|
2018-11-09 15:16:36 +01:00
|
|
|
default:
|
|
|
|
// code...
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
?>
|