aboutsummaryrefslogtreecommitdiffstats
path: root/php/misc.php
diff options
context:
space:
mode:
authoradam <adam@>2021-01-28 18:16:41 +0200
committeradam <adam@>2021-01-28 18:16:41 +0200
commit9cab0d0ed64f4e5289a0c979cae10a92508c391b (patch)
tree49fafe0e0067b7aa394a08556bda611bfdfe4c58 /php/misc.php
parentceedd596c9f39f53555fd0746a42d6b85cd49b6c (diff)
downloadfileup-9cab0d0ed64f4e5289a0c979cae10a92508c391b.tar.gz
initial registering stuff
Diffstat (limited to 'php/misc.php')
-rw-r--r--php/misc.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/php/misc.php b/php/misc.php
new file mode 100644
index 0000000..3ab0277
--- /dev/null
+++ b/php/misc.php
@@ -0,0 +1,18 @@
+<?php
+require_once "user.php";
+
+function validate_credentials(string $username,string $email,string $password,string $password2) : bool
+{
+ return true;
+}
+
+function generate_email_verification_link()
+{
+ /*TODO*/
+ $url="{$domain_name}/register/"+random_bytes(20);
+ mail($email,"Registration at ${domain_name}","Click here to register {$url}.");
+}
+
+
+
+?>