summaryrefslogtreecommitdiff
path: root/intern.gospeladlershof.de/code
diff options
context:
space:
mode:
Diffstat (limited to 'intern.gospeladlershof.de/code')
-rw-r--r--intern.gospeladlershof.de/code/check_login.php2
-rw-r--r--intern.gospeladlershof.de/code/login.php6
-rw-r--r--intern.gospeladlershof.de/code/template/text_mail.php2
3 files changed, 5 insertions, 5 deletions
diff --git a/intern.gospeladlershof.de/code/check_login.php b/intern.gospeladlershof.de/code/check_login.php
index 0ea8ecd..ca3a4ca 100644
--- a/intern.gospeladlershof.de/code/check_login.php
+++ b/intern.gospeladlershof.de/code/check_login.php
@@ -16,7 +16,7 @@ $redis = new Predis\Client([
$correct_hash = $redis->get($mail);
-if ( $hash === $correct_hash ) {
+if ( $hash === $correct_hash && $hash != "" && $correct_hash != "" ) {
$_SESSION["login"] = true;
$_SESSION["success"] = "Erfolgreich eingeloggt.";
$_SESSION["user"] = $mail;
diff --git a/intern.gospeladlershof.de/code/login.php b/intern.gospeladlershof.de/code/login.php
index 002ddd3..b1ad01f 100644
--- a/intern.gospeladlershof.de/code/login.php
+++ b/intern.gospeladlershof.de/code/login.php
@@ -19,7 +19,7 @@ foreach($addresses as $a) {
$htmlmessage = ob_get_clean();
ob_start();
- require __DIR__ . 'template/text_mail.php';
+ require __DIR__ . '/template/text_mail.php';
$textmessage = ob_get_clean();
$redis = new Predis\Client([
@@ -34,7 +34,7 @@ foreach($addresses as $a) {
$pheanstalk = new Pheanstalk('192.168.122.1');
$data = array(
- 'To' => $mail,
+ 'To' => array($mail),
'Name' => 'Gospelchor Adlershof',
'From' => 'noreply@gospeladlershof.de',
'ReplyTo' => 'webmaster@gospeladlershof.de',
@@ -44,7 +44,7 @@ foreach($addresses as $a) {
);
$pheanstalk
- ->useTube('contactme_mailer')
+ ->useTube('contactme_mail')
->put(json_encode($data));
$_SESSION["user"] = $mail;
diff --git a/intern.gospeladlershof.de/code/template/text_mail.php b/intern.gospeladlershof.de/code/template/text_mail.php
index 7e67be7..4b815ec 100644
--- a/intern.gospeladlershof.de/code/template/text_mail.php
+++ b/intern.gospeladlershof.de/code/template/text_mail.php
@@ -1,7 +1,7 @@
Hallo,
um dich auf der Webseite des Gospelchors einzuloggen, folge bitte diesem Link:
-https://intern.gospeladlershof.de/code/check_login.php?email=<?php echo htmlentities($mail);>&hash=<?php echo $hash; ?>
+https://intern.gospeladlershof.de/code/check_login.php?email=<?php echo htmlentities($mail);?>&hash=<?php echo $hash; ?>
Der Link verfällt innerhalb 24h.
Sollte der Link nicht funktionieren, dein Authentifizierungscode lautet <?php echo $hash; ?>.