mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-23 22:30:41 +01:00
26 lines
514 B
PHP
26 lines
514 B
PHP
<?php
|
|
include $_SESSION["docroot"].'/php/classes.user.php';
|
|
$user = new user;
|
|
if($_GET["function"]!="new"){
|
|
$user->get_info($_COOKIE["token"]);
|
|
}
|
|
|
|
switch ($_GET["function"]) {
|
|
case 'change-pw':
|
|
$user->change_password($_POST["current"], $_POST["new"]);
|
|
break;
|
|
|
|
case 'change-theme':
|
|
$user->change_theme($_POST["theme"]);
|
|
break;
|
|
|
|
|
|
case 'new':
|
|
$user->new($_POST["username"], $_POST["passwd"]);
|
|
break;
|
|
|
|
default:
|
|
// code...
|
|
break;
|
|
}
|
|
?>
|