|
|
@@ -5,8 +5,13 @@ require_once './db_connection.php'; |
|
|
|
require_once './modules/user.mod.php'; |
|
|
|
|
|
|
|
|
|
|
|
$chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&\'()*+-./:;<=>?@[\]^_`~'; |
|
|
|
|
|
|
|
$user = new User; |
|
|
|
|
|
|
|
$user -> name = $_GET['name']; |
|
|
|
$user -> pass = $_GET['pass']; |
|
|
|
$user -> insert (); |
|
|
|
$user -> pass = implode ( |
|
|
|
array_map (fn () => $chars[rand (0, strlen ($chars) - 1)], range (1, 8))); |
|
|
|
|
|
|
|
echo [$user -> insert () -> id]; |
|
|
|
|