login/mailpass: case-insensitive match of requested address
[minimedit.git] / login / mailpass.inc.php
index 2b0c204915f20e7fe9f079734d098b73e724c81e..77314a4ccfa02f91e27f1ff3cd4c2cc37615222c 100644 (file)
@@ -1,9 +1,10 @@
 <?php
 function userbymail($email)
 {
+       $email = strtolower($email);
        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/'));
                }
        }