Archived
1
0
Disbranĉigi 0
Ĉi tiu deponejo arĥiviĝis je 2024-01-28. Vi povas vidi kaj elŝuti dosierojn, sed ne povas puŝi nek raporti problemojn nek tirpeti.
blagoblag/admin/private/user_create.php

46 lines
1.4 KiB
PHP
Raw Permalink Normal View History

2019-02-13 20:43:32 -06:00
<?php
/* This file is free software: you can redistribute it and/or modify
it under the terms of version 3 of the GNU Affero General Public
License as published by the Free Software Foundation.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details. */
$depth = "../../";
include "../../res/lib/load.php";
2019-02-18 23:24:07 -06:00
$auth_user = scrub($_POST['auth_user']);
$auth_pass = scrub($_POST['auth_pass']);
$auth_id = user_name_to_id($auth_user);
$name = scrub($_POST['name']);
$full = scrub($_POST['full_name']);
$bio = scrub($_POST['bio']);
$email = scrub($_POST['email']);
$url = scrub($_POST['url']);
$pass = scrub($_POST['password']);
$login = scrub($_POST['login']);
2019-02-15 08:32:58 -06:00
// -------------------------------------
2019-02-18 23:24:07 -06:00
auth_enforce($auth_id, $auth_pass,
2019-02-15 08:32:58 -06:00
array("wizard", "archmage"), "make accounts");
2019-02-13 20:43:32 -06:00
2019-02-18 23:24:07 -06:00
input_enforce(array($name, $full, $bio, $email, $url, $pass,
$login),
array("Username", "Full name", "Biography", "E-mail",
2019-02-15 08:32:58 -06:00
"URL", "Password", "Login class"),
2019-02-18 23:24:07 -06:00
array("free_user_name", "string", "string",
"email", "url", "ne_string",
array("spectator", "wizard", "archmage", "contributor")));
2019-02-13 20:43:32 -06:00
2019-02-15 08:32:58 -06:00
// -------------------------------------
2019-02-18 23:24:07 -06:00
user_create($name, $pass, $login, $full, $email, $url, $bio);
2019-02-15 08:32:58 -06:00
root_redirect("user.php?name=" . $name);
2019-02-13 20:43:32 -06:00
?>