git.shiar.nl
/
minimedit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
page: indicate repost status in http redirects
[minimedit.git]
/
login
/
mailpass.inc.php
diff --git
a/login/mailpass.inc.php
b/login/mailpass.inc.php
index 5edc29e524f4099a4067dd20d55cb8b23d3845e3..77314a4ccfa02f91e27f1ff3cd4c2cc37615222c 100644
(file)
--- a/
login/mailpass.inc.php
+++ b/
login/mailpass.inc.php
@@
-1,9
+1,10
@@
<?php
function userbymail($email)
{
<?php
function userbymail($email)
{
+ $email = strtolower($email);
foreach (glob("profile/*") as $useropt) {
if ($mailopt = @file_get_contents("$useropt/email.txt")
foreach (glob("profile/*") as $useropt) {
if ($mailopt = @file_get_contents("$useropt/email.txt")
- and
rtrim($mailopt
) == $email) {
+ and
strtolower(rtrim($mailopt)
) == $email) {
return substr($useropt, strlen('profile/'));
}
}
return substr($useropt, strlen('profile/'));
}
}
@@
-21,7
+22,7
@@
function mailtoken($email)
if (!file_put_contents("profile/$found/.token", $token))
throw new Exception("could not store token for $found");
if (!file_put_contents("profile/$found/.token", $token))
throw new Exception("could not store token for $found");
- $sitename =
$_SERVER['HTTP_HOST']
;
+ $sitename =
preg_replace('/^www\./', '', $_SERVER['HTTP_HOST'])
;
$sitelink = 'https://'.$sitename;
$rep = [
'[[user]]' => $user->name ?: $found,
$sitelink = 'https://'.$sitename;
$rep = [
'[[user]]' => $user->name ?: $found,