only allow actions (admin) when in right state; prepare decline reason

- fixes on path's and varnames
This commit is contained in:
2018-02-23 17:43:08 +01:00
parent e88eb13d91
commit e38d201ec1
6 changed files with 57 additions and 41 deletions

View File

@@ -48,7 +48,7 @@ try {
}
require_once("../MatrixConnection.php");
$adminUrl = $webroot . "/admin_verify.php?t=" . $admin_token;
$adminUrl = $webroot . "/verify_admin.php?t=" . $admin_token;
$mxConn = new MatrixConnection($homeserver, $access_token);
$mxMsg = new MatrixMessage();
$mxMsg->set_body($first_name . ' ' . $last_name . "möchte sich registrieren und hat folgende Notiz hinterlassen:\r\n"
@@ -65,7 +65,7 @@ try {
}
$db->exec("UPDATE registrations SET state = " .
($response ? RegisterState::PendingAdminVerify : RegisterState::PendingAdminSend)
. " WHERE verify_token = \"" . $verify_token. "\";");
. " WHERE verify_token = \"" . $token. "\";");
send_mail_pending_approval($homeserver, $first_name . " " . $last_name, $email);