Merge branch 'second_implementation' of gitea.krombel.de:krombel/matrix-register-bot into second_implementation

This commit is contained in:
2018-03-03 14:27:17 +01:00
5 changed files with 17 additions and 17 deletions

View File

@@ -25,7 +25,7 @@ foreach ($mx_db->query($sql) as $row) {
$config["homeserver"],
$row["first_name"] . " " . $row["last_name"],
$row["email"],
$row["verify_url"]);
$verify_url);
if ($success) {
$mx_db->setRegistrationStateById(RegisterState::PendingEmailVerify, $row["id"]);
@@ -58,7 +58,7 @@ foreach ($mx_db->query($sql) as $row) {
case RegisterState::PendingRegistration:
// Registration got accepted but registration failed
$password = addUser($row["first_name"], $row["last_name"], $row["username"], $row["email"]);
$password = $mx_db->addUser($row["first_name"], $row["last_name"], $row["username"], $row["email"]);
if ($password != NULL) {
// send registration_success
$res = send_mail_registration_success($config["homeserver"], $first_name . " " . $last_name, $email, $username, $password, $config["howToURL"]);