Compare commits
51 Commits
ae83ea1404
...
second_imp
| Author | SHA1 | Date | |
|---|---|---|---|
| ff4947a49d | |||
| eb414e67df | |||
| 043e10596a | |||
| d58eeafdb5 | |||
| 8d84c99492 | |||
| b131e6b09e | |||
| 8c854f716d | |||
| d2b5cfbb5e | |||
| bce1d01b6d | |||
| 6b98ac4ae7 | |||
| d5f2b05d4d | |||
| cd239847ed | |||
| 8e50ae1bbd | |||
| 4d7da867ca | |||
| 2f0d1fc6b3 | |||
| 771078e1dd | |||
| 379aa26e6d | |||
| e92c197e59 | |||
| b4ca609c44 | |||
| ed15ec5bb5 | |||
| 01f124f744 | |||
| 9d2af26681 | |||
| 78ae932d85 | |||
| 56ae674c9c | |||
| 50946b73af | |||
| 9c636cdbcb | |||
| 93934cd117 | |||
| 45a4a38935 | |||
| 88003cb77e | |||
| a1b3f159e4 | |||
| 0c38e36aba | |||
| f595c445f2 | |||
| 9b1a9f9a79 | |||
| b736721a1c | |||
| b2842308b3 | |||
| b68f6afa97 | |||
| 40b6970c1c | |||
| 83cf11149b | |||
| 4e33985cfc | |||
| ff9969b04e | |||
| 076138a0a4 | |||
| a51f44c01b | |||
| e38d201ec1 | |||
| e88eb13d91 | |||
| 8fff520b28 | |||
| c62bd21646 | |||
| b8f8fc1f69 | |||
| bd06342ccf | |||
| f306dda4f9 | |||
| b56798dc35 | |||
| c1f5f4d451 |
@@ -1,18 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
class MatrixConnection
|
||||
{
|
||||
private $hs;
|
||||
|
||||
@@ -22,8 +22,6 @@ This is done in several steps:
|
||||
- To integrate with matrix-synapse-rest-auth:
|
||||
- `/_matrix-internal/identity/v1/check_credentials` should map to `internal/login.php`
|
||||
- To integrate with mxisd: Have a look at [the docs](https://github.com/kamax-io/mxisd/blob/master/docs/backends/rest.md) and apply as follows:
|
||||
|
||||
|
||||
| Key | file which handles that | Description |
|
||||
|--------------------------------|-------------------------------|------------------------------------------------------|
|
||||
| rest.endpoints.auth | internal/login.php | Validate credentials and get user profile |
|
||||
|
||||
@@ -22,8 +22,5 @@ $config = [
|
||||
// credentials for sqlite not used
|
||||
"databaseUser" => "dbUser123",
|
||||
"databasePass" => "secretPassword",
|
||||
|
||||
// default language: one of [ en-gb | de-de ]
|
||||
"defaultLanguage" => "en-gb"
|
||||
]
|
||||
?>
|
||||
|
||||
14
cron.php
14
cron.php
@@ -1,18 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
require_once("config.php");
|
||||
require_once("mail_templates.php");
|
||||
require_once("database.php");
|
||||
|
||||
38
database.php
38
database.php
@@ -1,18 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
require_once("config.php");
|
||||
if (!isset($config["databaseURI"])) {
|
||||
throw new Exception ("malformed configuration: databaseURI not defined");
|
||||
@@ -186,10 +172,12 @@ class mxDatabase
|
||||
*/
|
||||
function addRegistration($first_name, $last_name, $username, $note, $email) {
|
||||
if ($this->userPendingRegistrations($username)) {
|
||||
throw new Exception("USERNAME_PENDING_REGISTRATION");
|
||||
require_once("language.php");
|
||||
throw new Exception($language["USERNAME_PENDING_REGISTRATION"]." (requested)");
|
||||
}
|
||||
if ($this->userRegistered($username)) {
|
||||
throw new Exception("USERNAME_REGISTERED");
|
||||
require_once("language.php");
|
||||
throw new Exception($language["USERNAME_REGISTERED"] . " (registered)");
|
||||
}
|
||||
|
||||
$verify_token = bin2hex(random_bytes(16));
|
||||
@@ -304,24 +292,6 @@ class mxDatabase
|
||||
return NULL;
|
||||
}
|
||||
|
||||
function updatePassword($localpart, $old_password, $new_password) {
|
||||
$user = $this->getUserForLogin($localpart, $old_password);
|
||||
if ($user == NULL) {
|
||||
throw new Exception ("user with that credentials not found");
|
||||
}
|
||||
|
||||
// The credentials were fine. So now set the new password
|
||||
$password_hash = password_hash($new_password, PASSWORD_BCRYPT, ["cost"=>12]);
|
||||
|
||||
$sql = "UPDATE logins SET password_hash = '" . $password_hash . "'"
|
||||
. "WHERE localpart = '" . $localpart . "'";
|
||||
|
||||
if ($this->db->exec($sql)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function searchUserByName($search_term) {
|
||||
$term = filter_var($search_term, FILTER_SANITIZE_STRING);
|
||||
$result = array();
|
||||
|
||||
18
helpers.php
18
helpers.php
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
function stripLocalpart($mxid) {
|
||||
$localpart = NULL;
|
||||
if (!empty($mxid)) {
|
||||
// A mxid would start with an @ so we start at the 2. position
|
||||
$sepPos = strpos($mxid,':', 1);
|
||||
if ($sepPos === false) {
|
||||
// : not found. Assume mxid is localpart
|
||||
// TODO: further checks
|
||||
$localpart = $mxid;
|
||||
} else {
|
||||
$localpart = substr($mxid, 1, strpos($mxid,':') - 1 );
|
||||
}
|
||||
}
|
||||
return $localpart;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,18 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
require_once("../database.php");
|
||||
$response=[
|
||||
"limited" => false,
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
require_once("../database.php");
|
||||
$response = [
|
||||
"lookup" => []
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
require_once("../database.php");
|
||||
$response = new stdClass;
|
||||
try {
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// URL for this: /_matrix/client/r0/account/password?access_token=$ACCESS_TOKEN
|
||||
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
header('Access-Control-Allow-Methods: POST, OPTIONS');
|
||||
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization');
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
|
||||
print ("{}");
|
||||
// return with success
|
||||
exit();
|
||||
}
|
||||
$response= new stdClass;
|
||||
try {
|
||||
$inputJSON = file_get_contents('php://input');
|
||||
$input = json_decode($inputJSON, TRUE);
|
||||
if (empty($input)) {
|
||||
throw new Exception('no valid json as input present');
|
||||
}
|
||||
if (!isset($input["auth"])) {
|
||||
throw new Exception('"auth" is not defined');
|
||||
}
|
||||
if (!isset($input["auth"]["user"]) || !isset($input["auth"]["password"])) {
|
||||
throw new Exception('"auth.user" or "auth.password" is not defined');
|
||||
}
|
||||
if (!isset($input["auth"]["type"]) || $input["auth"]["type"] !== "m.login.password") {
|
||||
throw new Exception('no or unknown auth.type');
|
||||
}
|
||||
if (!isset($input["new_password"])) {
|
||||
throw new Exception('"new_password" is not defined');
|
||||
}
|
||||
|
||||
require_once("../helpers.php");
|
||||
$localpart = stripLocalpart($input["auth"]["user"]);
|
||||
|
||||
if (empty($localpart)) {
|
||||
throw new Exception ("localpart cannot be identified");
|
||||
}
|
||||
|
||||
require_once("../database.php");
|
||||
if (!$mx_db->updatePassword(
|
||||
$localpart,
|
||||
$input["auth"]["password"],
|
||||
$input["new_password"]
|
||||
)) {
|
||||
throw new Exception("invalid credentials or another error while updating");
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
header("HTTP/1.0 500 Internal Error");
|
||||
error_log("failed with error: " . $e->getMessage());
|
||||
$response = [
|
||||
"errorcode" => "M_UNKNOWN",
|
||||
"error" => $e->getMessage(),
|
||||
];
|
||||
}
|
||||
print (json_encode($response, JSON_PRETTY_PRINT));
|
||||
?>
|
||||
@@ -1,18 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
$response = [
|
||||
"auth" => [
|
||||
"success" => false,
|
||||
@@ -49,15 +35,22 @@ try {
|
||||
|
||||
// prefer the localpart attribute of mxisd. But in case of matrix-synapse-rest-auth
|
||||
// we have to parse it on our own
|
||||
if (empty($localpart)) {
|
||||
require_once("../helpers.php");
|
||||
$localpart = stripLocalpart($mxid);
|
||||
if (empty($localpart) && !empty($mxid)) {
|
||||
// A mxid would start with an @ so we start at the 2. position
|
||||
$sepPos = strpos($mxid,':', 1);
|
||||
if ($sepPos === false) {
|
||||
// : not found. Assume mxid is localpart
|
||||
// TODO: further checks
|
||||
$localpart = $mxid;
|
||||
} else {
|
||||
$localpart = substr($mxid, 1, strpos($mxid,':') - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (empty($localpart)) {
|
||||
throw new Exception ("localpart cannot be identified");
|
||||
}
|
||||
|
||||
|
||||
$password = NULL;
|
||||
if (isset($input["user"]) && isset($input["user"]["password"])) {
|
||||
$password = $input["user"]["password"];
|
||||
@@ -96,7 +89,7 @@ try {
|
||||
// we do not know how the data shall be transmitted so we do nothing with it
|
||||
$response["auth"]["success"] = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
error_log("Auth failed with error: " . $e->getMessage());
|
||||
$response["auth"]["error"] = $e->getMessage();
|
||||
|
||||
@@ -1,18 +1,4 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
$language = array(
|
||||
"NO_CONFIGURATION" => "Es konnte keine Konfiguration gefunden werden.",
|
||||
"UNKNOWN_SESSION" => "Sitzungstoken nicht vorhanden oder ungültig.",
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
$language = array(
|
||||
"NO_CONFIGURATION" => "No configuration found",
|
||||
"UNKNOWN_SESSION" => "Session token not found of invalid.",
|
||||
"UNKNOWN_USERNAME" => "username unknown",
|
||||
"UNKNOWN_TOKEN" => "Token is unknown",
|
||||
"USERNAME_LENGTH_INVALID" => "Username cpnsists pf more than 20 or less than 3 characters",
|
||||
"USERNAME_NOT_ALNUM" => "Username is not alphanumeric",
|
||||
"USERNAME_PENDING_REGISTRATION" => "This username is locked for registration. Try again later or try again with a different username",
|
||||
"USERNAME_REGISTERED" => "This username is already registered. Please try again with another username",
|
||||
"PASSWORD_NOT_MATCH" => "passwords do not match",
|
||||
"NOTE_LENGTH_EXEEDED" => "Note consists of more than 50 characters",
|
||||
"EMAIL_INVALID_FORMAT" => "no valid email address",
|
||||
"FIRSTNAME_INVALID_FORMAT" => "First name with invalid formatting",
|
||||
"SIRNAME_INVALID_FORMAT" => "Sirname with invalid formatting",
|
||||
"SEND_MAIL_FAIL" => "Email could not be sent",
|
||||
"SEND_MATRIX_FAIL" => "Sending a message to the admins failed",
|
||||
"REGISTRATION_REQUEST_FAILED" => "Registration request failed",
|
||||
"REGISTRATION_FAILED" => "Registration failed",
|
||||
"VERIFICATION_SUCEEDED" => "Verification suceeded",
|
||||
"VERIFICATION_FAILED" => "Verification failed",
|
||||
"VERIFICATION_SUCCESS_BODY" => "Thank you. The admins got informed",
|
||||
"ADMIN_VERIFY_SITE_TITLE" => "Handle registration request",
|
||||
"ADMIN_REGISTER_ACCEPTED_BODY" => "The registration request got accepted. The user got notified per email.",
|
||||
"ADMIN_REGISTER_DECLINED_BODY" => "The registration request got declined. The user got notified per email.",
|
||||
);
|
||||
?>
|
||||
@@ -1,124 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
function send_mail($receiver, $subject, $body) {
|
||||
include("config.php");
|
||||
$headers = "From: " . $config["register_email"] . "\r\n"
|
||||
. "Content-Type: text/plain;charset=utf-8";
|
||||
return mail($receiver, $subject, $body, $headers);
|
||||
}
|
||||
|
||||
function send_mail_pending_verification($homeserver, $user, $receiver, $verify_url) {
|
||||
$subject = "Bitte bestätige Registrierung auf $homeserver";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Du hast anscheinend versucht dich auf $homeserver zu registrieren.
|
||||
Hier gibt es eine zweistufige Registrierung.
|
||||
|
||||
Wir möchten dich bitten, dass du kurz bestätigst, dass du die Registrierung durchgeführt hast.
|
||||
Gehe dafür auf folgenden Link:
|
||||
$verify_url
|
||||
|
||||
Erst anschließend werden die Administratoren über deine Registrierungsanfrage informiert.
|
||||
|
||||
Hinweis: Du hast ca. 48 Stunden Zeit um die Bestätigung durchzuführen.
|
||||
Danach ist eine Re-Registrierung mit deinem gewünschten Nutzernamen für andere wieder möglich.
|
||||
|
||||
Vielen Dank für dein Verständnis.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
|
||||
function send_mail_pending_approval($homeserver, $user, $receiver) {
|
||||
$subject = "Registrierung wartet auf Bestätigung durch Administratoren";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Deine Registrierungsanfrage wurde verifiziert und wird nun durch die Administratoren überprüft.
|
||||
|
||||
Du bekommst eine weitere E-Mail, sobald deine Registrierung bestätigt oder ablehnt wurde.
|
||||
|
||||
Vielen Dank für dein Verständnis.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
|
||||
function send_mail_registration_allowed_but_failed($homeserver, $user, $receiver) {
|
||||
$subject = "Registrierung auf $homeserver genehmigt";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Deine Registrierungsanfrage wurde durch die Administratoren bestätigt.
|
||||
|
||||
Leider ist beim Registrieren ein Fehler aufgetaucht. Der Registrierungversuch wird bald wiederholt.
|
||||
Wir hoffen, das Problem ist bald behoben.
|
||||
Wir melden uns, wenn die Registrierung erfolgreich war.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body);
|
||||
|
||||
}
|
||||
|
||||
function send_mail_registration_success($homeserver, $user, $receiver, $username, $password, $howToURL) {
|
||||
$subject = "Registrierung auf $homeserver erfolgreich";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Deine Registrierungsanfrage wurde durch die Administratoren bestätigt.
|
||||
|
||||
Zum Anmelden kannst du folgende Zugangsdaten verwenden:
|
||||
Nutzername: $username
|
||||
Passwort: $password
|
||||
|
||||
Hinweis: Das Passwort kannst du aktuell über die App selbst ändern. Auch wenn das Passwort nirgends
|
||||
im Klartext gespeichert wird, kann jemand Zugriff auf diese Mail erlangen und so den Zugriff bekommen.
|
||||
";
|
||||
/*
|
||||
Wichtig: Bitte ändere das Passwort direkt nach der Anmeldung.
|
||||
Es wird zwar von unserer Seite nicht gespeichert, doch fremde könnten Zugriff auf diese E-Mail
|
||||
erhalten und so deinen Account kompromittieren.
|
||||
*/
|
||||
if (!empty($howToURL)) {
|
||||
$body .= "
|
||||
Zu weiteren Hilfestellungen findest du hier eine Auflistung von verschiedenen
|
||||
Anleitungen zu verschiedenen Clients:
|
||||
$howToURL\n";
|
||||
}
|
||||
$body .= "
|
||||
Viel Spaß bei der Verwendung von $homeserver.
|
||||
Bei Fragen findest du nach der Anmeldung ein paar Räume in denen du sie stellen kannst.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body);
|
||||
|
||||
}
|
||||
function send_mail_registration_decline($homeserver, $user, $receiver, $reason) {
|
||||
$subject = "Registrierung auf $homeserver abgelehnt";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Deine Registrierungsanfrage wurde durch die Administratoren abgelehnt.\n";
|
||||
|
||||
if (empty($reason)) {
|
||||
$body .= "\nEs wurde kein Grund angegeben\n";
|
||||
} else {
|
||||
$body .= "\nAls Grund wurde folgendes angegeben:\n$reason\n";
|
||||
}
|
||||
|
||||
$body .= "
|
||||
Wir hoffen, dass du dies akzeptieren kannst.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
?>
|
||||
@@ -1,118 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
function send_mail($receiver, $subject, $body) {
|
||||
include("config.php");
|
||||
$headers = "From: " . $config["register_email"] . "\r\n"
|
||||
. "Content-Type: text/plain;charset=utf-8";
|
||||
return mail($receiver, $subject, $body, $headers);
|
||||
}
|
||||
|
||||
function send_mail_pending_verification($homeserver, $user, $receiver, $verify_url) {
|
||||
$subject = "Pleast approve your registration request on $homeserver";
|
||||
$body = "Dear " . $user . ",
|
||||
|
||||
It seems that you tried to register on $homeserver.
|
||||
This homeserver requires a two step registration.
|
||||
|
||||
For this we want you to verify that you want to register. For this please click on this link:
|
||||
$verify_url
|
||||
|
||||
The admins will informed about your registration request once you clicked on this link.
|
||||
|
||||
Note: This registration request will be cleaned up in 48 hours.
|
||||
Others might take your username afterwards.
|
||||
|
||||
Thanks for your patience.
|
||||
|
||||
The admin team of " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
|
||||
function send_mail_pending_approval($homeserver, $user, $receiver) {
|
||||
$subject = "Registration is pending verification from an admin";
|
||||
$body = "Dear " . $user . ",
|
||||
|
||||
You have verified your registration request. The admins are now checking your request.
|
||||
|
||||
You will get an email once they approve or decline your request.
|
||||
|
||||
Sincerely,
|
||||
|
||||
The admin team of " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
|
||||
function send_mail_registration_allowed_but_failed($homeserver, $user, $receiver) {
|
||||
$subject = "Registration on $homeserver got approved";
|
||||
$body = "Dear " . $user . ",
|
||||
|
||||
Your registration request got approved by the admin team.
|
||||
|
||||
But there was a problem when triggering the registration request. It will be retried in a few minutes.
|
||||
We hope that the issue will be fixed soon.
|
||||
You will get another email with initial credentials once the registration got handled completely.
|
||||
|
||||
The admin team of " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body);
|
||||
|
||||
}
|
||||
|
||||
function send_mail_registration_success($homeserver, $user, $receiver, $username, $password, $howToURL) {
|
||||
$subject = "Registration on $homeserver got approved";
|
||||
$body = "Dear " . $user . ",
|
||||
|
||||
Your registration request got verified by the admin team.
|
||||
|
||||
To log in you can use the following credentials::
|
||||
Username: $username
|
||||
Password: $password
|
||||
|
||||
Important: Please change your password as soon as possible after your first login.
|
||||
The password is not stored in clear text on the server but people could get access to this mail
|
||||
and compromise your account.
|
||||
";
|
||||
if (!empty($howToURL)) {
|
||||
$body .= "
|
||||
You can find further help here::
|
||||
$howToURL\n";
|
||||
}
|
||||
$body .= "
|
||||
Enjoy your usage of $homeserver.
|
||||
You can ask further questions inside of the chat system.
|
||||
|
||||
The admin team of " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body);
|
||||
|
||||
}
|
||||
function send_mail_registration_decline($homeserver, $user, $receiver, $reason) {
|
||||
$subject = "Registration on $homeserver declined.";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Your registration request got declined by the admin team.\n";
|
||||
|
||||
if (empty($reason)) {
|
||||
$body .= "\nThey did not provide any reason for this\n";
|
||||
} else {
|
||||
$body .= "\nThey provide following hint for you:\n$reason\n";
|
||||
}
|
||||
|
||||
$body .= "
|
||||
We hope that you can understand this reason.
|
||||
|
||||
The admin team of " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
?>
|
||||
20
language.php
20
language.php
@@ -1,27 +1,11 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
require_once("config.php");
|
||||
$lang=$config["defaultLanguage"];
|
||||
|
||||
$lang = "de-de";
|
||||
if(isset($_GET['lang'])){
|
||||
$lang = filter_var($_GET['lang'], FILTER_SANITIZE_STRING);
|
||||
}
|
||||
$lang_file = dirname(__FILE__) . "/lang/lang.".$lang.".php";
|
||||
if (!file_exists($lang_file)) {
|
||||
error_log("Translation for '" . $lang . "' not found. Fallback to 'de-de'");
|
||||
error_log("Translation for " . $lang . " not found. Fallback to 'de-de'");
|
||||
$lang = "de-de";
|
||||
}
|
||||
require_once($lang_file);
|
||||
|
||||
@@ -1,28 +1,108 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
|
||||
function send_mail($receiver, $subject, $body) {
|
||||
include("config.php");
|
||||
$headers = "From: " . $config["register_email"] . "\r\n"
|
||||
. "Content-Type: text/plain;charset=utf-8";
|
||||
return mail($receiver, $subject, $body, $headers);
|
||||
}
|
||||
|
||||
function send_mail_pending_verification($homeserver, $user, $receiver, $verify_url) {
|
||||
$subject = "Bitte bestätige Registrierung auf $homeserver";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Du hast anscheinend versucht dich auf $homeserver zu registrieren.
|
||||
Hier gibt es eine zweistufige Registrierung.
|
||||
|
||||
Wir möchten dich bitten, dass du kurz bestätigst, dass du die Registrierung durchgeführt hast.
|
||||
Gehe dafür auf folgenden Link:
|
||||
$verify_url
|
||||
|
||||
Erst anschließend werden die Administratoren über deine Registrierungsanfrage informiert.
|
||||
|
||||
Hinweis: Du hast ca. 48 Stunden Zeit um die Bestätigung durchzuführen.
|
||||
Danach ist eine Re-Registrierung mit deinem gewünschten Nutzernamen für andere wieder möglich.
|
||||
|
||||
Vielen Dank für dein Verständnis.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
|
||||
function send_mail_pending_approval($homeserver, $user, $receiver) {
|
||||
$subject = "Registrierung wartet auf Bestätigung durch Administratoren";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Deine Registrierungsanfrage wurde verifiziert und wird nun durch die Administratoren überprüft.
|
||||
|
||||
Du bekommst eine weitere E-Mail, sobald deine Registrierung bestätigt oder ablehnt wurde.
|
||||
|
||||
Vielen Dank für dein Verständnis.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
|
||||
function send_mail_registration_allowed_but_failed($homeserver, $user, $receiver) {
|
||||
$subject = "Registrierung auf $homeserver genehmigt.";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Deine Registrierungsanfrage wurde durch die Administratoren bestätigt.
|
||||
|
||||
Leider ist beim Registrieren ein Fehler aufgetaucht. Der Registrierungversuch wird bald wiederholt.
|
||||
Wir hoffen, das Problem ist bald behoben.
|
||||
Wir melden uns, wenn die Registrierung erfolgreich war.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body);
|
||||
|
||||
}
|
||||
|
||||
function send_mail_registration_success($homeserver, $user, $receiver, $username, $password, $howToURL) {
|
||||
$subject = "Registrierung auf $homeserver erfolgreich.";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Deine Registrierungsanfrage wurde durch die Administratoren bestätigt.
|
||||
|
||||
Zum Anmelden kannst du folgende Zugangsdaten verwenden:
|
||||
Nutzername: $username
|
||||
Passwort: $password
|
||||
|
||||
Hinweis: Aktuell ist es nicht möglich, das Passwort selbst zu ändern. Sobald die Funktionalität zur
|
||||
Verfügung steht, gibt es aber einen Hinweis.
|
||||
";
|
||||
/*
|
||||
Wichtig: Bitte ändere das Passwort direkt nach der Anmeldung.
|
||||
Es wird zwar von unserer Seite nicht gespeichert, doch fremde könnten Zugriff auf diese E-Mail
|
||||
erhalten und so deinen Account kompromittieren.
|
||||
*/
|
||||
require_once("config.php");
|
||||
$lang=$config["defaultLanguage"];
|
||||
if(isset($_GET['lang'])){
|
||||
$lang = filter_var($_GET['lang'], FILTER_SANITIZE_STRING);
|
||||
if (!empty($howToURL)) {
|
||||
$body .= "
|
||||
Zu weiteren Hilfestellungen findest du hier eine Auflistung von verschiedenen
|
||||
Anleitungen zu verschiedenen Clients:
|
||||
$howToURL\n";
|
||||
}
|
||||
$lang_file = dirname(__FILE__) . "/lang/mail.".$lang.".php";
|
||||
if (!file_exists($lang_file)) {
|
||||
error_log("Mail templates for '" . $lang . "' not found. Fallback to 'de-de'");
|
||||
$lang = "de-de";
|
||||
$body .= "
|
||||
Viel Spaß bei der Verwendung von $homeserver.
|
||||
Bei Fragen findest du nach der Anmeldung ein paar Räume in denen du sie stellen kannst.
|
||||
|
||||
Das Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body);
|
||||
|
||||
}
|
||||
function send_mail_registration_decline($homeserver, $user, $receiver, $reason) {
|
||||
$subject = "Registrierung auf $homeserver abgelehnt.";
|
||||
$body = "Guten Tag " . $user . ",
|
||||
|
||||
Deine Registrierungsanfrage wurde durch die Administratoren abgelehnt.\n";
|
||||
|
||||
if (empty($reason)) {
|
||||
$body .= "\nEs wurde kein Grund angegeben\n";
|
||||
} else {
|
||||
$body .= "\nAls Grund wurde folgendes angegeben:\n$reason\n";
|
||||
}
|
||||
|
||||
$body .= "\nDas Administratoren-Team von " . $homeserver;
|
||||
return send_mail($receiver, $subject, $body );
|
||||
}
|
||||
require_once($lang_file);
|
||||
unset($lang_file);
|
||||
?>
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
<html><head><?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
require_once "../language.php";
|
||||
if (!file_exists("../config.php")) {
|
||||
print($language["NO_CONFIGURATION"]);
|
||||
@@ -32,32 +20,32 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
try {
|
||||
if (!isset($_SESSION["token"]) || !isset($_POST["token"]) || $_SESSION["token"] != $_POST["token"]) {
|
||||
// token not present or invalid
|
||||
throw new Exception("UNKNOWN_SESSION");
|
||||
throw new Exception($language["UNKNOWN_SESSION"]);
|
||||
}
|
||||
if (!isset($_POST["username"])) {
|
||||
throw new Exception("UNKNOWN_USERNAME");
|
||||
throw new Exception($language["UNKNOWN_USERNAME"]);
|
||||
}
|
||||
if (strlen($_POST["username"] > 20 || strlen($_POST["username"]) < 3)) {
|
||||
throw new Exception("USERNAME_LENGTH_INVALID");
|
||||
throw new Exception($language["USERNAME_LENGTH_INVALID"]);
|
||||
}
|
||||
if (ctype_alnum($_POST['username']) != true) {
|
||||
throw new Exception("USERNAME_NOT_ALNUM");
|
||||
throw new Exception($language["USERNAME_NOT_ALNUM"]);
|
||||
}
|
||||
if (isset($config["getPasswordOnRegistration"]) && $config["getPasswordOnRegistration"] &&
|
||||
$_POST["password"] != $_POST["password_confirm"]) {
|
||||
throw new Exception("PASSWORD_NOT_MATCH");
|
||||
throw new Exception($language["PASSWORD_NOT_MATCH"]);
|
||||
}
|
||||
if (isset($_POST["note"]) && strlen($_POST["note"]) > 50) {
|
||||
throw new Exception("NOTE_LENGTH_EXEEDED");
|
||||
throw new Exception($language["NOTE_LENGTH_EXEEDED"]);
|
||||
}
|
||||
if (!isset($_POST["email"]) || !filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) {
|
||||
throw new Exception("EMAIL_INVALID_FORMAT");
|
||||
throw new Exception($language["EMAIL_INVALID_FORMAT"]);
|
||||
}
|
||||
if (isset($_POST["first_name"]) && ! preg_match("/[A-Z][a-z]+/", $_POST["first_name"])) {
|
||||
throw new Exception("FIRSTNAME_INVALID_FORMAT");
|
||||
throw new Exception($language["FIRSTNAME_INVALID_FORMAT"]);
|
||||
}
|
||||
if (isset($_POST["last_name"]) && ! preg_match("/[A-Z][a-z]+/", $_POST["last_name"])) {
|
||||
throw new Exception("SIRNAME_INVALID_FORMAT");
|
||||
throw new Exception($language["SIRNAME_INVALID_FORMAT"]);
|
||||
}
|
||||
|
||||
$first_name = filter_var($_POST["first_name"], FILTER_SANITIZE_STRING);
|
||||
@@ -99,11 +87,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
print("<title>" . $language["REGISTRATION_REQUEST_FAILED"] . "</title>");
|
||||
print("</head><body>");
|
||||
print("<h1>" . $language["REGISTRATION_REQUEST_FAILED"] . "</h1>");
|
||||
if (isset($language[$e->getMessage()])) {
|
||||
print("<p>" . $language[$e->getMessage()] . "</p>");
|
||||
} else {
|
||||
print("<p>" . $e->getMessage() . "</p>");
|
||||
}
|
||||
print("<p>" . $e->getMessage() . "</p>");
|
||||
print("<a href=\"" . $config["webroot"] . "/index.php" . "\">Zur Registrierungsseite</a>");
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
<html><head><?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
require_once "../language.php";
|
||||
if (!file_exists("../config.php")) {
|
||||
print($language["NO_CONFIGURATION"]);
|
||||
@@ -34,7 +22,7 @@ try {
|
||||
throw new Exception("Method not allowed");
|
||||
}
|
||||
if (!isset($_GET["t"])) {
|
||||
throw new Exception("UNKNOWN_TOKEN");
|
||||
throw new Exception($language["UNKNOWN_TOKEN"]);
|
||||
}
|
||||
$token = filter_var($_GET["t"], FILTER_SANITIZE_STRING);
|
||||
|
||||
@@ -42,7 +30,7 @@ try {
|
||||
|
||||
$user = $mx_db->getUserForVerify($token);
|
||||
if ($user == NULL) {
|
||||
throw new Exception("UNKNOWN_TOKEN");
|
||||
throw new Exception($language["UNKNOWN_TOKEN"]);
|
||||
}
|
||||
$first_name = $user["first_name"];
|
||||
$last_name = $user["last_name"];
|
||||
@@ -81,11 +69,7 @@ try {
|
||||
print("<title>" . $language["VERIFICATION_FAILED"] . "</title>");
|
||||
print("</head><body>");
|
||||
print("<h1>" . $language["VERIFICATION_FAILED"] . "</h1>");
|
||||
if (isset($language[$e->getMessage()])) {
|
||||
print("<p>" . $language[$e->getMessage()] . "</p>");
|
||||
} else {
|
||||
print("<p>" . $e->getMessage() . "</p>");
|
||||
}
|
||||
print("<p>" . $e->getMessage() . "</p>");
|
||||
print("<a href=\"" . $config["webroot"] . "/index.php" . "\">Zur Registrierungsseite</a>");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1,18 +1,6 @@
|
||||
<html><head><?php
|
||||
/**
|
||||
* Copyright 2018 Matthias Kesler
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
<html>
|
||||
<head>
|
||||
<?php
|
||||
require_once "../language.php";
|
||||
if (!file_exists("../config.php")) {
|
||||
print($language["NO_CONFIGURATION"]);
|
||||
@@ -34,7 +22,7 @@ try {
|
||||
throw new Exception("Method not allowed");
|
||||
}
|
||||
if (!isset($_GET["t"])) {
|
||||
throw new Exception("UNKNOWN_TOKEN");
|
||||
throw new Exception($language["UNKNOWN_TOKEN"]);
|
||||
}
|
||||
$token = filter_var($_GET["t"], FILTER_SANITIZE_STRING);
|
||||
|
||||
@@ -54,7 +42,7 @@ try {
|
||||
|
||||
$user = $mx_db->getUserForApproval($token);
|
||||
if ($user == NULL) {
|
||||
throw new Exception("UNKNOWN_TOKEN");
|
||||
throw new Exception($language["UNKNOWN_TOKEN"]);
|
||||
}
|
||||
|
||||
$first_name = $user["first_name"];
|
||||
@@ -86,7 +74,7 @@ try {
|
||||
$mxMsg->set_type("m.text");
|
||||
$mxMsg->set_body("Fehler beim Registrieren von " . $first_name . " " . $last_name . ".");
|
||||
$mxConn->send($config["register_room"], $mxMsg);
|
||||
throw new Exception("REGISTRATION_FAILED");
|
||||
throw new Exception($language["REGISTRATION_FAILED"]);
|
||||
}
|
||||
|
||||
print("<title>" . $language["ADMIN_VERIFY_SITE_TITLE"] . "</title>");
|
||||
@@ -172,11 +160,7 @@ background: rgba(255, 255, 255, 0.8);
|
||||
print("<title>" . $language["REGISTRATION_FAILED"] . "</title>");
|
||||
print("</head><body>");
|
||||
print("<h1>" . $language["REGISTRATION_FAILED"] . "</h1>");
|
||||
if (isset($language[$e->getMessage()])) {
|
||||
print("<p>" . $language[$e->getMessage()] . "</p>");
|
||||
} else {
|
||||
print("<p>" . $e->getMessage() . "</p>");
|
||||
}
|
||||
print("<p>" . $e->getMessage() . "</p>");
|
||||
print("<a href=\"" . $config["webroot"] . "/index.php" . "\">Zur Registrierungsseite</a>");
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user