Second implementation with matrix_synapse_rest_auth #2
@@ -151,12 +151,12 @@ class mxDatabase
|
|||||||
*/
|
*/
|
||||||
function addRegistration($first_name, $last_name, $username, $note, $email) {
|
function addRegistration($first_name, $last_name, $username, $note, $email) {
|
||||||
if ($this->userPendingRegistrations($username)) {
|
if ($this->userPendingRegistrations($username)) {
|
||||||
require_once "language.php";
|
require_once("language.php");
|
||||||
throw new Exception($language["USERNAME_PENDING_REGISTRATION"]);
|
throw new Exception($language["USERNAME_PENDING_REGISTRATION"]." (requested)");
|
||||||
}
|
}
|
||||||
if ($this->userRegistered($username)) {
|
if ($this->userRegistered($username)) {
|
||||||
require_once "language.php";
|
require_once("language.php");
|
||||||
throw new Exception($language["USERNAME_REGISTERED"]);
|
throw new Exception($language["USERNAME_REGISTERED"] . " (registered)");
|
||||||
}
|
}
|
||||||
|
|
||||||
$verify_token = bin2hex(random_bytes(16));
|
$verify_token = bin2hex(random_bytes(16));
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ try {
|
|||||||
if (isset($_GET["allow"])) {
|
if (isset($_GET["allow"])) {
|
||||||
$action = RegisterState::RegistrationAccepted;
|
$action = RegisterState::RegistrationAccepted;
|
||||||
}
|
}
|
||||||
$decline_reason = "Noch nicht implementiert";
|
$decline_reason = NULL;
|
||||||
if (isset($_GET["deny"])) {
|
if (isset($_GET["deny"])) {
|
||||||
$action = RegisterState::RegistrationDeclined;
|
$action = RegisterState::RegistrationDeclined;
|
||||||
if (isset($_GET["reason"])) {
|
if (isset($_GET["reason"])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user